Only use -Werror if a .error file is found (main makefile only).

This commit is contained in:
Steve 2018-07-07 14:47:48 +01:00
parent ba1efa90fe
commit a040e58fa4
4 changed files with 7 additions and 4 deletions

View File

@ -1,5 +1,5 @@
VERSION = 1.4
REVISION = 1
REVISION = 2
LOCALE_MO = $(patsubst %.po,%.mo,$(wildcard locale/*.po))
OUT = bin

View File

@ -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

View File

@ -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

View File

@ -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