actualitzat Makefile
This commit is contained in:
13
Makefile
13
Makefile
@@ -26,7 +26,7 @@ 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
|
||||||
CXXFLAGS2:= -std=c++11 -Wall -static-libstdc++
|
CXXFLAGS_DEBUG:= -std=c++11 -Wall
|
||||||
LDFLAGS := -lmingw32 -lws2_32 -lSDL2main -lSDL2 -lopengl32
|
LDFLAGS := -lmingw32 -lws2_32 -lSDL2main -lSDL2 -lopengl32
|
||||||
RM = del /Q
|
RM = del /Q
|
||||||
MKD:= mkdir
|
MKD:= mkdir
|
||||||
@@ -34,6 +34,7 @@ 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
|
CXXFLAGS:= -std=c++11 -Wall -Os -ffunction-sections -fdata-sections
|
||||||
|
CXXFLAGS_DEBUG:= -std=c++11 -Wall
|
||||||
LDFLAGS := -lSDL2
|
LDFLAGS := -lSDL2
|
||||||
RM = rm -f
|
RM = rm -f
|
||||||
MKD:= mkdir -p
|
MKD:= mkdir -p
|
||||||
@@ -43,6 +44,7 @@ else
|
|||||||
endif
|
endif
|
||||||
ifeq ($(UNAME_S),Darwin)
|
ifeq ($(UNAME_S),Darwin)
|
||||||
CXXFLAGS += -Wno-deprecated
|
CXXFLAGS += -Wno-deprecated
|
||||||
|
CXXFLAGS_DEBUG += -Wno-deprecated
|
||||||
LDFLAGS += -framework OpenGL
|
LDFLAGS += -framework OpenGL
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@@ -137,7 +139,7 @@ windows_rec:
|
|||||||
|
|
||||||
windows_debug:
|
windows_debug:
|
||||||
@echo off
|
@echo off
|
||||||
$(CXX) $(SOURCES) -D VERBOSE $(CXXFLAGS2) $(LDFLAGS) -o "$(TARGET_FILE)_debug.exe"
|
$(CXX) $(SOURCES) -D DEBUG -D VERBOSE $(CXXFLAGS_DEBUG) $(LDFLAGS) -o "$(TARGET_FILE)_debug.exe"
|
||||||
|
|
||||||
windows_release:
|
windows_release:
|
||||||
@echo off
|
@echo off
|
||||||
@@ -168,11 +170,8 @@ windows_release:
|
|||||||
macos:
|
macos:
|
||||||
$(CXX) $(SOURCES) $(CXXFLAGS) $(LDFLAGS) -o "$(TARGET_FILE)"
|
$(CXX) $(SOURCES) $(CXXFLAGS) $(LDFLAGS) -o "$(TARGET_FILE)"
|
||||||
|
|
||||||
macos_fast:
|
|
||||||
$(CXX) $(SOURCES) -D VERBOSE -std=c++11 -Wall -Wno-deprecated -lSDL2 -framework OpenGL -o "$(TARGET_FILE)"
|
|
||||||
|
|
||||||
macos_debug:
|
macos_debug:
|
||||||
$(CXX) $(SOURCES) -D DEBUG $(CXXFLAGS) $(LDFLAGS) -o "$(TARGET_FILE)_debug"
|
$(CXX) $(SOURCES) -D DEBUG -D VERBOSE $(CXXFLAGS_DEBUG) $(LDFLAGS) -o "$(TARGET_FILE)_debug"
|
||||||
|
|
||||||
macos_release:
|
macos_release:
|
||||||
# Elimina datos de compilaciones anteriores
|
# Elimina datos de compilaciones anteriores
|
||||||
@@ -225,7 +224,7 @@ linux:
|
|||||||
strip -s -R .comment -R .gnu.version "$(TARGET_FILE)" --strip-unneeded
|
strip -s -R .comment -R .gnu.version "$(TARGET_FILE)" --strip-unneeded
|
||||||
|
|
||||||
linux_debug:
|
linux_debug:
|
||||||
$(CXX) $(SOURCES) -D DEBUG $(CXXFLAGS) $(LDFLAGS) -o "$(TARGET_FILE)_debug"
|
$(CXX) $(SOURCES) -D DEBUG -D VERBOSE $(CXXFLAGS_DEBUG) $(LDFLAGS) -o "$(TARGET_FILE)_debug"
|
||||||
strip -s -R .comment -R .gnu.version "$(TARGET_FILE)_debug" --strip-unneeded
|
strip -s -R .comment -R .gnu.version "$(TARGET_FILE)_debug" --strip-unneeded
|
||||||
|
|
||||||
linux_release:
|
linux_release:
|
||||||
|
|||||||
Reference in New Issue
Block a user