From a040e58fa4dd03c99c521601e54032fbf692d9e3 Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 7 Jul 2018 14:47:48 +0100 Subject: [PATCH] Only use -Werror if a .error file is found (main makefile only). --- common.mk | 2 +- makefile | 5 ++++- makefile.mac | 2 +- makefile.pandora | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/common.mk b/common.mk index 14458fc..4354450 100644 --- a/common.mk +++ b/common.mk @@ -1,5 +1,5 @@ VERSION = 1.4 -REVISION = 1 +REVISION = 2 LOCALE_MO = $(patsubst %.po,%.mo,$(wildcard locale/*.po)) OUT = bin diff --git a/makefile b/makefile index ea8ec2c..3d66d48 100644 --- a/makefile +++ b/makefile @@ -20,8 +20,11 @@ _OBJS += unixInit.o include common.mk CXXFLAGS += `sdl2-config --cflags` -DVERSION=$(VERSION) -DREVISION=$(REVISION) -DDATA_DIR=\"$(DATA_DIR)\" -DLOCALE_DIR=\"$(LOCALE_DIR)\" -CXXFLAGS += -Wall -Wempty-body -ansi -pedantic -Werror -Wstrict-prototypes -Werror=maybe-uninitialized -Warray-bounds +CXXFLAGS += -ansi -pedantic CXXFLAGS += -g -lefence +ifneq ("$(wildcard .errors)","") +CXXFLAGS += -Wall -Wempty-body -Werror -Wstrict-prototypes -Werror=maybe-uninitialized -Warray-bounds +endif LDFLAGS += `sdl2-config --libs` -lSDL2_mixer -lSDL2_image -lSDL2_ttf -lm diff --git a/makefile.mac b/makefile.mac index 6f6fe1c..c2dcf1b 100644 --- a/makefile.mac +++ b/makefile.mac @@ -11,7 +11,7 @@ _OBJS += unixInit.o include common.mk CXXFLAGS += `sdl2-config --cflags` -DVERSION=$(VERSION) -DREVISION=$(REVISION) -DDATA_DIR=\"$(DATA_DIR)\" -DLOCALE_DIR=\"$(LOCALE_DIR)\" -CXXFLAGS += -Wall -Wempty-body -ansi -pedantic -Werror -Wstrict-prototypes -Werror=uninitialized -Warray-bounds +CXXFLAGS += -ansi -pedantic CXXFLAGS += -g LDFLAGS += `sdl2-config --libs` -lSDL2_mixer -lSDL2_image -lSDL2_ttf -lm diff --git a/makefile.pandora b/makefile.pandora index 2cf2af6..ec342b4 100644 --- a/makefile.pandora +++ b/makefile.pandora @@ -10,7 +10,7 @@ _OBJS += unixInit.o include common.mk CXXFLAGS += `sdl2-config --cflags` -DVERSION=$(VERSION) -DREVISION=$(REVISION) -DDATA_DIR=\"$(DATA_DIR)\" -DLOCALE_DIR=\"$(LOCALE_DIR)\" -DFIXED_RESOLUTION=1 -CXXFLAGS += -ansi -Wstrict-prototypes +CXXFLAGS += -ansi CXXFLAGS += -g -lefence -flto -flto-odr-type-merging LDFLAGS += `sdl2-config --libs` -lSDL2_mixer -lSDL2_image -lSDL2_ttf -lm