New variable WARNINGS to hold all warning options

This commit is contained in:
Pavel Roskin 2000-07-28 19:41:32 +00:00
parent 616d13bcd1
commit 43c17b3d96

View File

@ -61,6 +61,8 @@ STRIPTOOL = $(CROSS)strip
OPTIMIZATION = $(shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \ OPTIMIZATION = $(shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \
then echo "-Os"; else echo "-O2" ; fi) then echo "-Os"; else echo "-O2" ; fi)
WARNINGS = -Wall
ifeq ($(DODMALLOC),true) ifeq ($(DODMALLOC),true)
# For testing mem leaks with dmalloc # For testing mem leaks with dmalloc
CFLAGS+=-DDMALLOC CFLAGS+=-DDMALLOC
@ -70,11 +72,11 @@ ifeq ($(DODMALLOC),true)
endif endif
# -D_GNU_SOURCE is needed because environ is used in init.c # -D_GNU_SOURCE is needed because environ is used in init.c
ifeq ($(DODEBUG),true) ifeq ($(DODEBUG),true)
CFLAGS += -Wall -g -D_GNU_SOURCE CFLAGS += $(WARNINGS) -g -D_GNU_SOURCE
LDFLAGS += LDFLAGS +=
STRIP = STRIP =
else else
CFLAGS += -Wall $(OPTIMIZATION) -fomit-frame-pointer -D_GNU_SOURCE CFLAGS += $(WARNINGS) $(OPTIMIZATION) -fomit-frame-pointer -D_GNU_SOURCE
LDFLAGS += -s LDFLAGS += -s
STRIP = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $(PROG) STRIP = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $(PROG)
#Only staticly link when _not_ debugging #Only staticly link when _not_ debugging