diff --git a/FLAC/FLAC.vcproj b/FLAC/FLAC.vcproj index 0192c2d88..5c7a8edbc 100644 --- a/FLAC/FLAC.vcproj +++ b/FLAC/FLAC.vcproj @@ -48,6 +48,8 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" + EnableFunctionLevelLinking="true" + RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="true" diff --git a/Makefile.linux b/Makefile.linux index 43ed51005..d5f8aea78 100644 --- a/Makefile.linux +++ b/Makefile.linux @@ -3,7 +3,7 @@ CXX ?= g++ CC ?= gcc NASM ?= nasm ifndef DEBUG -CFLAGS ?= -pipe -Wall -Wno-unused -O2 -fomit-frame-pointer +CFLAGS ?= -pipe -Wall -Wno-unused -O2 -fomit-frame-pointer -ffunction-sections -fvtable-gc -fno-rtti else CFLAGS ?= -pipe -Wall -Wno-unused endif @@ -38,7 +38,7 @@ ZDOOMDEBUG = zdoomd ifndef DEBUG OBJDIR = $(RELEASEOBJ) CFLAGS += -DNDEBUG - LDFLAGS += -Wl,-Map=$(ZDOOM).map + LDFLAGS += -s -Wl,--gc-sections,-Map=$(ZDOOM).map ZDOOMBIN = $(ZDOOM) else OBJDIR = $(DEBUGOBJ) @@ -81,8 +81,8 @@ ifndef RESTART $(OBJDIR)/autozend.o -o $(ZDOOMBIN) endif -# include any of the dep files that already exist -$(foreach dep,$(DEPS),$(if $(wildcard $(dep)),$(eval include $(dep)))) +# include any of the dep files that already exist if we aren't making clean +$(if !$(findstring clean,$(MAKECMDGOALS)),$(foreach dep,$(DEPS),$(if $(wildcard $(dep)),$(eval include $(dep))))) # textually substitute in the _dep_ and the _src_ it depends on to create rules # for creating dependency files without any existing dependency files diff --git a/default.cbd b/default.cbd index f9c9494d9..f89ef8605 100644 --- a/default.cbd +++ b/default.cbd @@ -52,10 +52,10 @@ do ifopt debug TARGET = "${DEBUGTARGET}" else OBJDIR = "${RELEASEOBJDIR}" - CFLAGS += "-march=${ARCH_TYPE} -mtune=${TUNE_TYPE} -Wall -Wno-unused -O${OPTLEVEL} -fomit-frame-pointer" + CFLAGS += "-march=${ARCH_TYPE} -mtune=${TUNE_TYPE} -Wall -Wno-unused -O${OPTLEVEL} -fomit-frame-pointer -ffunction-sections -fvtable-gc -fno-rtti" CPPFLAGS += " -DNDEBUG" CXXFLAGS = "${CFLAGS}" - LDFLAGS += " -Wl,-Map=zdoomgcc.map" + LDFLAGS += " -s -Wl,--gc-sections,-Map=zdoomgcc.map" TARGET = "${RELEASETARGET}" done @@ -446,12 +446,12 @@ if "${EVILCLEAN}"="0" ifexist zdoom.pk3 exit 0 CFLAGS = '-Os -Wall -fomit-frame-pointer' -LDFLAGS = '-lz' +LDFLAGS = '-s -lz' src_paths tools/makewad ${COMPILER} makewad.c ioapi.c zip.c ${LINK} tools/makewad/makewad -LDFLAGS = '' +LDFLAGS = '-s' src_paths tools/xlatcc ${COMPILER} xlat-parse.tab.c gen.c ${LINK} tools/xlatcc/xlatcc diff --git a/zlib/zlib.vcproj b/zlib/zlib.vcproj index fed06c621..b441dc859 100644 --- a/zlib/zlib.vcproj +++ b/zlib/zlib.vcproj @@ -48,6 +48,8 @@ PreprocessorDefinitions="WIN32,_DEBUG,_LIB" BasicRuntimeChecks="3" RuntimeLibrary="1" + EnableFunctionLevelLinking="true" + RuntimeTypeInfo="false" UsePrecompiledHeader="0" PrecompiledHeaderFile="" AssemblerListingLocation=".\Debug/"