mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r24365) -Fix-ish: add C(XX)FLAGS_BUILD to all the executables that are compiled for the build enviroment
This commit is contained in:
parent
854b3921a4
commit
66d14c50f1
|
@ -14,6 +14,7 @@ LANGS_SRC = $(shell ls $(LANG_DIR)/*.txt)
|
||||||
LANGS = $(LANGS_SRC:$(LANG_DIR)/%.txt=%.lng)
|
LANGS = $(LANGS_SRC:$(LANG_DIR)/%.txt=%.lng)
|
||||||
CXX_BUILD = !!CXX_BUILD!!
|
CXX_BUILD = !!CXX_BUILD!!
|
||||||
CFLAGS_BUILD = !!CFLAGS_BUILD!!
|
CFLAGS_BUILD = !!CFLAGS_BUILD!!
|
||||||
|
CXXFLAGS_BUILD= !!CXXFLAGS_BUILD!!
|
||||||
LDFLAGS_BUILD = !!LDFLAGS_BUILD!!
|
LDFLAGS_BUILD = !!LDFLAGS_BUILD!!
|
||||||
STRGEN_FLAGS = !!STRGEN_FLAGS!!
|
STRGEN_FLAGS = !!STRGEN_FLAGS!!
|
||||||
STAGE = !!STAGE!!
|
STAGE = !!STAGE!!
|
||||||
|
@ -44,23 +45,23 @@ all: table/strings.h $(LANGS)
|
||||||
|
|
||||||
strgen_base.o: $(SRC_DIR)/strgen/strgen_base.cpp $(SRC_DIR)/strgen/strgen.h endian_host.h $(SRC_DIR)/table/control_codes.h $(SRC_DIR)/table/strgen_tables.h
|
strgen_base.o: $(SRC_DIR)/strgen/strgen_base.cpp $(SRC_DIR)/strgen/strgen.h endian_host.h $(SRC_DIR)/table/control_codes.h $(SRC_DIR)/table/strgen_tables.h
|
||||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSTRGEN -c -o $@ $<
|
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $<
|
||||||
|
|
||||||
strgen.o: $(SRC_DIR)/strgen/strgen.cpp $(SRC_DIR)/strgen/strgen.h endian_host.h $(SRC_DIR)/table/control_codes.h $(SRC_DIR)/table/strgen_tables.h
|
strgen.o: $(SRC_DIR)/strgen/strgen.cpp $(SRC_DIR)/strgen/strgen.h endian_host.h $(SRC_DIR)/table/control_codes.h $(SRC_DIR)/table/strgen_tables.h
|
||||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSTRGEN -c -o $@ $<
|
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $<
|
||||||
|
|
||||||
string.o: $(SRC_DIR)/string.cpp endian_host.h
|
string.o: $(SRC_DIR)/string.cpp endian_host.h
|
||||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSTRGEN -c -o $@ $<
|
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $<
|
||||||
|
|
||||||
alloc_func.o: $(SRC_DIR)/core/alloc_func.cpp endian_host.h
|
alloc_func.o: $(SRC_DIR)/core/alloc_func.cpp endian_host.h
|
||||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSTRGEN -c -o $@ $<
|
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $<
|
||||||
|
|
||||||
getoptdata.o: $(SRC_DIR)/misc/getoptdata.cpp $(SRC_DIR)/misc/getoptdata.h
|
getoptdata.o: $(SRC_DIR)/misc/getoptdata.cpp $(SRC_DIR)/misc/getoptdata.h
|
||||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/misc/%.cpp=%.cpp)'
|
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/misc/%.cpp=%.cpp)'
|
||||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSTRGEN -c -o $@ $<
|
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $<
|
||||||
|
|
||||||
lang/english.txt: $(LANG_DIR)/english.txt
|
lang/english.txt: $(LANG_DIR)/english.txt
|
||||||
$(Q)mkdir -p lang
|
$(Q)mkdir -p lang
|
||||||
|
@ -68,7 +69,7 @@ lang/english.txt: $(LANG_DIR)/english.txt
|
||||||
|
|
||||||
$(STRGEN): alloc_func.o string.o strgen_base.o strgen.o getoptdata.o
|
$(STRGEN): alloc_func.o string.o strgen_base.o strgen.o getoptdata.o
|
||||||
$(E) '$(STAGE) Compiling and Linking $@'
|
$(E) '$(STAGE) Compiling and Linking $@'
|
||||||
$(Q)$(CXX_BUILD) $(LDFLAGS_BUILD) $^ -o $@
|
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) $(LDFLAGS_BUILD) $^ -o $@
|
||||||
|
|
||||||
table/strings.h: lang/english.txt $(STRGEN)
|
table/strings.h: lang/english.txt $(STRGEN)
|
||||||
$(E) '$(STAGE) Generating $@'
|
$(E) '$(STAGE) Generating $@'
|
||||||
|
@ -87,7 +88,7 @@ endian_host.h: $(ENDIAN_CHECK)
|
||||||
|
|
||||||
$(ENDIAN_CHECK): $(SRC_DIR)/endian_check.cpp
|
$(ENDIAN_CHECK): $(SRC_DIR)/endian_check.cpp
|
||||||
$(E) '$(STAGE) Compiling and Linking $@'
|
$(E) '$(STAGE) Compiling and Linking $@'
|
||||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $< -o $@
|
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) $(LDFLAGS_BUILD) $< -o $@
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ ENDIAN_CHECK = !!ENDIAN_CHECK!!
|
||||||
SRC_DIR = !!SRC_DIR!!
|
SRC_DIR = !!SRC_DIR!!
|
||||||
CXX_BUILD = !!CXX_BUILD!!
|
CXX_BUILD = !!CXX_BUILD!!
|
||||||
CFLAGS_BUILD = !!CFLAGS_BUILD!!
|
CFLAGS_BUILD = !!CFLAGS_BUILD!!
|
||||||
|
CXXFLAGS_BUILD = !!CXXFLAGS_BUILD!!
|
||||||
LDFLAGS_BUILD = !!LDFLAGS_BUILD!!
|
LDFLAGS_BUILD = !!LDFLAGS_BUILD!!
|
||||||
STAGE = !!STAGE!!
|
STAGE = !!STAGE!!
|
||||||
SETTING_OBJS_DIR = !!SETTING_OBJS_DIR!!
|
SETTING_OBJS_DIR = !!SETTING_OBJS_DIR!!
|
||||||
|
@ -29,27 +30,27 @@ all: table/settings.h
|
||||||
|
|
||||||
settingsgen.o: $(SRC_DIR)/settingsgen/settingsgen.cpp $(SRC_DIR)/string_func.h $(SRC_DIR)/strings_type.h $(SRC_DIR)/misc/getoptdata.h $(SRC_DIR)/ini_type.h $(SRC_DIR)/core/smallvec_type.hpp
|
settingsgen.o: $(SRC_DIR)/settingsgen/settingsgen.cpp $(SRC_DIR)/string_func.h $(SRC_DIR)/strings_type.h $(SRC_DIR)/misc/getoptdata.h $(SRC_DIR)/ini_type.h $(SRC_DIR)/core/smallvec_type.hpp
|
||||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
|
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
|
||||||
|
|
||||||
alloc_func.o: $(SRC_DIR)/core/alloc_func.cpp endian_host.h
|
alloc_func.o: $(SRC_DIR)/core/alloc_func.cpp endian_host.h
|
||||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
|
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
|
||||||
|
|
||||||
getoptdata.o: $(SRC_DIR)/misc/getoptdata.cpp $(SRC_DIR)/misc/getoptdata.h
|
getoptdata.o: $(SRC_DIR)/misc/getoptdata.cpp $(SRC_DIR)/misc/getoptdata.h
|
||||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/misc/%.cpp=%.cpp)'
|
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/misc/%.cpp=%.cpp)'
|
||||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
|
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
|
||||||
|
|
||||||
string.o: $(SRC_DIR)/string.cpp endian_host.h
|
string.o: $(SRC_DIR)/string.cpp endian_host.h
|
||||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
|
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
|
||||||
|
|
||||||
ini_load.o: $(SRC_DIR)/ini_load.cpp $(SRC_DIR)/core/alloc_func.hpp $(SRC_DIR)/core/mem_func.hpp $(SRC_DIR)/ini_type.h $(SRC_DIR)/string_func.h
|
ini_load.o: $(SRC_DIR)/ini_load.cpp $(SRC_DIR)/core/alloc_func.hpp $(SRC_DIR)/core/mem_func.hpp $(SRC_DIR)/ini_type.h $(SRC_DIR)/string_func.h
|
||||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
|
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
|
||||||
|
|
||||||
$(SETTINGSGEN): alloc_func.o string.o ini_load.o settingsgen.o getoptdata.o
|
$(SETTINGSGEN): alloc_func.o string.o ini_load.o settingsgen.o getoptdata.o
|
||||||
$(E) '$(STAGE) Compiling and Linking $@'
|
$(E) '$(STAGE) Compiling and Linking $@'
|
||||||
$(Q)$(CXX_BUILD) $(LDFLAGS_BUILD) $^ -o $@
|
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) $(LDFLAGS_BUILD) $^ -o $@
|
||||||
|
|
||||||
table/settings.h: $(SETTINGSGEN) $(SRC_DIR)/table/settings.h.preamble $(SRC_DIR)/table/settings.h.postamble $(SRC_DIR)/table/*.ini
|
table/settings.h: $(SETTINGSGEN) $(SRC_DIR)/table/settings.h.preamble $(SRC_DIR)/table/settings.h.postamble $(SRC_DIR)/table/*.ini
|
||||||
$(E) '$(STAGE) Generating $@'
|
$(E) '$(STAGE) Generating $@'
|
||||||
|
@ -64,7 +65,7 @@ endian_host.h: $(ENDIAN_CHECK)
|
||||||
|
|
||||||
$(ENDIAN_CHECK): $(SRC_DIR)/endian_check.cpp
|
$(ENDIAN_CHECK): $(SRC_DIR)/endian_check.cpp
|
||||||
$(E) '$(STAGE) Compiling and Linking $@'
|
$(E) '$(STAGE) Compiling and Linking $@'
|
||||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $< -o $@
|
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) $(LDFLAGS_BUILD) $< -o $@
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
|
|
||||||
|
|
|
@ -1771,6 +1771,7 @@ make_cflags_and_ldflags() {
|
||||||
|
|
||||||
if [ "$enable_assert" = "0" ]; then
|
if [ "$enable_assert" = "0" ]; then
|
||||||
CFLAGS="$CFLAGS -DNDEBUG"
|
CFLAGS="$CFLAGS -DNDEBUG"
|
||||||
|
CFLAGS_BUILD="$CFLAGS_BUILD -DNDEBUG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$enable_desync_debug" != "0" ]; then
|
if [ "$enable_desync_debug" != "0" ]; then
|
||||||
|
|
Loading…
Reference in New Issue