Changed output executable naming scheme
Now the Makefile and CMake build systems are identical: Release builds are named CSE2, and debug builds are named CSE2d. Language no longer has an effect on filename for the Makefile.
This commit is contained in:
parent
36119082d2
commit
6dc85875ff
4 changed files with 39 additions and 37 deletions
12
.gitignore
vendored
12
.gitignore
vendored
|
@ -15,18 +15,14 @@ msvc2003/devilution/compare.asm
|
||||||
|
|
||||||
# Exclude build output on Linux (exclude normally produced executable files)
|
# Exclude build output on Linux (exclude normally produced executable files)
|
||||||
build_en/CSE2
|
build_en/CSE2
|
||||||
|
build_en/CSE2d
|
||||||
build_en/DoConfig
|
build_en/DoConfig
|
||||||
|
build_en/DoConfigd
|
||||||
# The Makefile outputs "release" and "debug" for the english build
|
|
||||||
build_en/release
|
|
||||||
build_en/debug
|
|
||||||
|
|
||||||
build_jp/CSE2
|
build_jp/CSE2
|
||||||
|
build_jp/CSE2d
|
||||||
build_jp/DoConfig
|
build_jp/DoConfig
|
||||||
|
build_jp/DoConfigd
|
||||||
# The Makefile outputs "releasejp" and "debugjp" for the japanese build
|
|
||||||
build_jp/releasejp
|
|
||||||
build_jp/debugjp
|
|
||||||
|
|
||||||
|
|
||||||
# Exclude executables in the build folder (and .exe.manifest files)
|
# Exclude executables in the build folder (and .exe.manifest files)
|
||||||
|
|
|
@ -274,14 +274,32 @@ foreach(FILENAME IN LISTS RESOURCES)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# Force strict C90
|
# Force strict C90
|
||||||
set_property(TARGET CSE2 PROPERTY C_STANDARD 90)
|
set_target_properties(CSE2 PROPERTIES
|
||||||
set_property(TARGET CSE2 PROPERTY C_STANDARD_REQUIRED ON)
|
C_STANDARD 90
|
||||||
set_property(TARGET CSE2 PROPERTY C_EXTENSIONS OFF)
|
C_STANDARD_REQUIRED ON
|
||||||
|
C_EXTENSIONS OFF
|
||||||
|
)
|
||||||
|
|
||||||
# Force strict C++98
|
# Force strict C++98
|
||||||
set_property(TARGET CSE2 PROPERTY CXX_STANDARD 98)
|
set_target_properties(CSE2 PROPERTIES
|
||||||
set_property(TARGET CSE2 PROPERTY CXX_STANDARD_REQUIRED ON)
|
CXX_STANDARD 98
|
||||||
set_property(TARGET CSE2 PROPERTY CXX_EXTENSIONS OFF)
|
CXX_STANDARD_REQUIRED ON
|
||||||
|
CXX_EXTENSIONS OFF
|
||||||
|
)
|
||||||
|
|
||||||
|
# Name debug builds "CSE2d", to distinguish them
|
||||||
|
set_target_properties(CSE2 PROPERTIES
|
||||||
|
DEBUG_OUTPUT_NAME "CSE2d"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Send executable to the build_en/build_jp directory
|
||||||
|
set_target_properties(CSE2 PROPERTIES
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY ${BUILD_DIRECTORY}
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${BUILD_DIRECTORY}
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${BUILD_DIRECTORY}
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${BUILD_DIRECTORY}
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${BUILD_DIRECTORY}
|
||||||
|
)
|
||||||
|
|
||||||
# Enable link-time optimisation if available
|
# Enable link-time optimisation if available
|
||||||
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
@ -332,15 +350,6 @@ else()
|
||||||
target_link_libraries(CSE2 freetype)
|
target_link_libraries(CSE2 freetype)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Send executable to the build_en/build_jp directory
|
|
||||||
set_target_properties(CSE2 PROPERTIES
|
|
||||||
RUNTIME_OUTPUT_DIRECTORY ${BUILD_DIRECTORY}
|
|
||||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${BUILD_DIRECTORY}
|
|
||||||
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${BUILD_DIRECTORY}
|
|
||||||
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${BUILD_DIRECTORY}
|
|
||||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${BUILD_DIRECTORY}
|
|
||||||
)
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# DoConfig
|
# DoConfig
|
||||||
##
|
##
|
||||||
|
|
|
@ -10,6 +10,9 @@ project(DoConfig LANGUAGES CXX)
|
||||||
|
|
||||||
add_executable(DoConfig "DoConfig.cpp" "icon.rc")
|
add_executable(DoConfig "DoConfig.cpp" "icon.rc")
|
||||||
|
|
||||||
|
# Name debug builds "DoConfigd", to distinguish them
|
||||||
|
set_target_properties(CSE2 PROPERTIES DEBUG_OUTPUT_NAME "DoConfigd")
|
||||||
|
|
||||||
# Windows tweak
|
# Windows tweak
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set_target_properties(DoConfig PROPERTIES WIN32_EXECUTABLE YES) # Disable the console window
|
set_target_properties(DoConfig PROPERTIES WIN32_EXECUTABLE YES) # Disable the console window
|
||||||
|
|
22
Makefile
22
Makefile
|
@ -1,22 +1,16 @@
|
||||||
ifeq ($(RELEASE), 1)
|
ifeq ($(RELEASE), 1)
|
||||||
CXXFLAGS = -O3 -flto
|
CXXFLAGS = -O3 -flto
|
||||||
LDFLAGS = -s
|
LDFLAGS = -s
|
||||||
FILENAME_DEF = release
|
FILENAME_DEF = CSE2
|
||||||
else
|
else
|
||||||
CXXFLAGS = -O0 -g
|
CXXFLAGS = -O0 -g
|
||||||
FILENAME_DEF = debug
|
FILENAME_DEF = CSE2d
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(JAPANESE), 1)
|
ifeq ($(JAPANESE), 1)
|
||||||
BUILD_DIR = build_jp
|
BUILD_DIR = build_jp
|
||||||
|
|
||||||
CXXFLAGS += -DJAPANESE
|
CXXFLAGS += -DJAPANESE
|
||||||
|
|
||||||
ifeq ($(RELEASE), 1)
|
|
||||||
FILENAME_DEF = releasejp
|
|
||||||
else
|
|
||||||
FILENAME_DEF = debugjp
|
|
||||||
endif
|
|
||||||
else
|
else
|
||||||
BUILD_DIR = build_en
|
BUILD_DIR = build_en
|
||||||
endif
|
endif
|
||||||
|
@ -197,11 +191,11 @@ ifneq ($(WINDOWS), 1)
|
||||||
RESOURCES += ICON/ICON_MINI.bmp
|
RESOURCES += ICON/ICON_MINI.bmp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OBJECTS = $(addprefix obj/$(FILENAME)/, $(addsuffix .o, $(SOURCES)))
|
OBJECTS = $(addprefix obj/$(BUILD_DIR)/$(FILENAME)/, $(addsuffix .o, $(SOURCES)))
|
||||||
DEPENDENCIES = $(addprefix obj/$(FILENAME)/, $(addsuffix .o.d, $(SOURCES)))
|
DEPENDENCIES = $(addprefix obj/$(BUILD_DIR)/$(FILENAME)/, $(addsuffix .o.d, $(SOURCES)))
|
||||||
|
|
||||||
ifeq ($(WINDOWS), 1)
|
ifeq ($(WINDOWS), 1)
|
||||||
OBJECTS += obj/$(FILENAME)/win_icon.o
|
OBJECTS += obj/$(BUILD_DIR)/$(FILENAME)/win_icon.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: $(BUILD_DIR)/$(FILENAME)
|
all: $(BUILD_DIR)/$(FILENAME)
|
||||||
|
@ -212,12 +206,12 @@ $(BUILD_DIR)/$(FILENAME): $(OBJECTS)
|
||||||
@$(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)
|
@$(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)
|
||||||
@echo Finished compiling: $@
|
@echo Finished compiling: $@
|
||||||
|
|
||||||
obj/$(FILENAME)/%.o: src/%.cpp
|
obj/$(BUILD_DIR)/$(FILENAME)/%.o: src/%.cpp
|
||||||
@mkdir -p $(@D)
|
@mkdir -p $(@D)
|
||||||
@echo Compiling $<
|
@echo Compiling $<
|
||||||
@$(CXX) $(CXXFLAGS) $< -o $@ -c
|
@$(CXX) $(CXXFLAGS) $< -o $@ -c
|
||||||
|
|
||||||
obj/$(FILENAME)/Resource.o: src/Resource.cpp $(addprefix src/Resource/, $(addsuffix .h, $(RESOURCES)))
|
obj/$(BUILD_DIR)/$(FILENAME)/Resource.o: src/Resource.cpp $(addprefix src/Resource/, $(addsuffix .h, $(RESOURCES)))
|
||||||
@mkdir -p $(@D)
|
@mkdir -p $(@D)
|
||||||
@echo Compiling $<
|
@echo Compiling $<
|
||||||
@$(CXX) $(CXXFLAGS) $< -o $@ -c
|
@$(CXX) $(CXXFLAGS) $< -o $@ -c
|
||||||
|
@ -234,7 +228,7 @@ obj/bin2h: src/misc/bin2h.c
|
||||||
|
|
||||||
include $(wildcard $(DEPENDENCIES))
|
include $(wildcard $(DEPENDENCIES))
|
||||||
|
|
||||||
obj/$(FILENAME)/win_icon.o: res/ICON/ICON.rc res/ICON/0.ico res/ICON/ICON_MINI.ico
|
obj/$(BUILD_DIR)/$(FILENAME)/win_icon.o: res/ICON/ICON.rc res/ICON/0.ico res/ICON/ICON_MINI.ico
|
||||||
@mkdir -p $(@D)
|
@mkdir -p $(@D)
|
||||||
@windres $< $@
|
@windres $< $@
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue