Changeset - r17419:c35536c1a16e
[Not reviewed]
master
0 2 0
glx - 13 years ago 2011-03-04 00:27:17
glx@openttd.org
(svn r22180) -Fix: when using -static-libgcc, also use -static-libstdc++
2 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
Makefile.setting.in
Show inline comments
 
@@ -23,52 +23,52 @@ ifdef VERBOSE
 
else
 
	Q = @
 
	E = @echo
 
endif
 

	
 
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
 
	$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
 
	$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
 

	
 
alloc_func.o: $(SRC_DIR)/core/alloc_func.cpp endian_host.h
 
	$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
 
	$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
 

	
 
getoptdata.o: $(SRC_DIR)/misc/getoptdata.cpp $(SRC_DIR)/misc/getoptdata.h
 
	$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/misc/%.cpp=%.cpp)'
 
	$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
 

	
 
string.o: $(SRC_DIR)/string.cpp endian_host.h
 
	$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
 
	$(Q)$(CXX_BUILD) $(CFLAGS_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
 
	$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/misc/%.cpp=%.cpp)'
 
	$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
 
	$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
 

	
 
$(SETTINGSGEN): alloc_func.o ini_load.o settingsgen.o getoptdata.o string.o
 
$(SETTINGSGEN): alloc_func.o string.o ini_load.o settingsgen.o getoptdata.o
 
	$(E) '$(STAGE) Compiling and Linking $@'
 
	$(Q)$(CXX_BUILD) $(LDFLAGS_BUILD) $^ -o $@
 

	
 
table/settings.h: $(SETTINGSGEN) $(SRC_DIR)/table/settings.h.preamble $(SRC_DIR)/table/settings.h.postamble $(SRC_DIR)/table/*.ini
 
	$(E) '$(STAGE) Generating $@'
 
	@mkdir -p table
 
	$(Q)./$(SETTINGSGEN) -o table/settings.h -b $(SRC_DIR)/table/settings.h.preamble -a $(SRC_DIR)/table/settings.h.postamble $(SRC_DIR)/table/*.ini
 

	
 
# The targets to compile the endian-code
 

	
 
endian_host.h: $(ENDIAN_CHECK)
 
	$(E) '$(STAGE) Testing endianness for host'
 
	$(Q)./$(ENDIAN_CHECK) > $@
 

	
 
$(ENDIAN_CHECK): $(SRC_DIR)/endian_check.cpp
 
	$(E) '$(STAGE) Compiling and Linking $@'
 
	$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $< -o $@
 

	
 
depend:
 

	
 
clean:
 
	$(E) '$(STAGE) Cleaning up settings files'
 
	$(Q)rm -f settingsgen.o alloc_func.o getoptdata.o ini_load.o $(SETTINGSGEN) $(ENDIAN_TARGETS) table/settings.h
 

	
config.lib
Show inline comments
 
@@ -1399,49 +1399,49 @@ make_cflags_and_ldflags() {
 
		LDFLAGS="$LDFLAGS -pg"
 
	fi
 

	
 
	if [ "$with_threads" = "0" ]; then
 
		CFLAGS="$CFLAGS -DNO_THREADS"
 
	fi
 

	
 
	if [ "`echo $1 | cut -c 1-3`" != "icc" ]; then
 
		if [ "$os" = "CYGWIN" ]; then
 
			flags="$flags -mwin32"
 
			LDFLAGS="$LDFLAGS -mwin32"
 
		fi
 
		if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
 
			flags="$flags -mno-cygwin"
 

	
 
			if [ "$enable_console" != "0" ]; then
 
				LDFLAGS="$LDFLAGS -mno-cygwin -Wl,--subsystem,console"
 
			else
 
				LDFLAGS="$LDFLAGS -mno-cygwin -Wl,--subsystem,windows"
 
			fi
 

	
 
			LIBS="$LIBS -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32"
 

	
 
			if [ $cc_version -ge 44 ]; then
 
				LDFLAGS_BUILD="$LDFLAGS_BUILD -static-libgcc"
 
				LDFLAGS_BUILD="$LDFLAGS_BUILD -static-libgcc -static-libstdc++"
 
			fi
 
		fi
 
	fi
 

	
 
	if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "FREEBSD" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then
 
		LIBS="$LIBS -lpthread"
 
	fi
 

	
 
	if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "MINGW" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ]; then
 
		LIBS="$LIBS -lc"
 
	fi
 
	if [ "$os" = "WINCE" ]; then
 
		LIBS="$LIBS -lcoredll -lcorelibc -laygshell -lws2 -e WinMainCRTStartup"
 
	fi
 
	if [ "$os" = "PSP" ]; then
 
		CFLAGS="$CFLAGS -I`$psp_config -p`/include"
 
		LDFLAGS="$LDFLAGS -L`$psp_config -p`/lib"
 

	
 
		CFLAGS="$CFLAGS -fno-exceptions -fno-rtti -D_PSP_FW_VERSION=150"
 
		LIBS="$LIBS -D_PSP_FW_VERSION=150 -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -lm"
 
	fi
 

	
 
	if [ "$os" = "MORPHOS" ]; then
 
		# -Wstrict-prototypes generates much noise because of system headers
0 comments (0 inline, 0 general)