Actualizado makefile
This commit is contained in:
15
Makefile
15
Makefile
@@ -26,16 +26,23 @@ ifeq ($(OS),Windows_NT)
|
|||||||
FixPath = $(subst /,\,$1)
|
FixPath = $(subst /,\,$1)
|
||||||
SOURCES := source/*.cpp source/common/*.cpp
|
SOURCES := source/*.cpp source/common/*.cpp
|
||||||
CXXFLAGS:= -std=c++11 -Wall -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows
|
CXXFLAGS:= -std=c++11 -Wall -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows
|
||||||
LDFLAGS := -lmingw32 -lws2_32 -lSDL2main -lSDL2
|
LDFLAGS := -lmingw32 -lws2_32 -lSDL2main -lSDL2 -lopengl32
|
||||||
RM = del /Q
|
RM = del /Q
|
||||||
MKD:= mkdir
|
MKD:= mkdir
|
||||||
else
|
else
|
||||||
FixPath = $1
|
FixPath = $1
|
||||||
SOURCES := $(shell find $(DIR_SOURCES) -name '*.cpp')
|
SOURCES := $(shell find $(DIR_SOURCES) -name '*.cpp')
|
||||||
CXXFLAGS:= -std=c++11 -Wall -Os -ffunction-sections -fdata-sections -framework OpenGL -Wno-deprecated
|
CXXFLAGS:= -std=c++11 -Wall -Os -ffunction-sections -fdata-sections -Wno-deprecated
|
||||||
LDFLAGS := -lSDL2
|
LDFLAGS := -lSDL2
|
||||||
RM = rm -f
|
RM = rm -f
|
||||||
MKD:= mkdir -p
|
MKD:= mkdir -p
|
||||||
|
UNAME_S := $(shell uname -s)
|
||||||
|
ifeq ($(UNAME_S),Linux)
|
||||||
|
LDFLAGS += -lGL
|
||||||
|
endif
|
||||||
|
ifeq ($(UNAME_S),Darwin)
|
||||||
|
LDFLAGS += -framework OpenGL
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OBJECTS := $(subst $(DIR_SOURCES), $(DIR_BUILD), $(SOURCES))
|
OBJECTS := $(subst $(DIR_SOURCES), $(DIR_BUILD), $(SOURCES))
|
||||||
|
|||||||
Reference in New Issue
Block a user