diff options
author | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2008-05-26 10:16:01 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2008-05-26 10:16:01 +0000 |
commit | 9b73dce1fd6d87728b360bcecf48d75191364384 (patch) | |
tree | dd6e23b1e953c1bc9bd4dd6188a0df2025a4f19c /Makefile | |
parent | 4d343e3c6dd24a16f36a320723e2eb4db580e150 (diff) | |
download | netsurf-9b73dce1fd6d87728b360bcecf48d75191364384.tar.gz netsurf-9b73dce1fd6d87728b360bcecf48d75191364384.tar.bz2 |
Update optimisation/warning flags
svn path=/trunk/netsurf/; revision=4204
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -126,7 +126,7 @@ GTKCFLAGS := -std=c99 -Dgtk -Dnsgtk \ -D_XOPEN_SOURCE=600 \ -D_POSIX_C_SOURCE=200112L \ -D_NETBSD_SOURCE \ - $(WARNFLAGS) -I. -I../../libsprite/trunk/ -g -O \ + $(WARNFLAGS) -I. -I../../libsprite/trunk/ -g $(OPT2FLAGS) \ $(shell $(PKG_CONFIG) --cflags libglade-2.0 gtk+-2.0 librsvg-2.0) \ $(shell $(PKG_CONFIG) --cflags librosprite) \ $(shell xml2-config --cflags) @@ -142,7 +142,7 @@ endif endif ifeq ($(TARGET),riscos) -CFLAGS += -I. -O $(WARNFLAGS) -Driscos \ +CFLAGS += -I. $(OPTFLAGS) $(WARNFLAGS) -Driscos \ -std=c99 -D_BSD_SOURCE -D_POSIX_C_SOURCE \ -mpoke-function-name @@ -174,7 +174,7 @@ CFLAGS += -std=c99 -DDEBUG_BUILD \ -D_XOPEN_SOURCE=600 \ -D_POSIX_C_SOURCE=200112L \ -D_NETBSD_SOURCE \ - $(WARNFLAGS) -I. -I../../libsprite/trunk/ -g -O0 \ + $(WARNFLAGS) -I. -I../../libsprite/trunk/ -g $(OPT0FLAGS) \ $(shell $(PKG_CONFIG) --cflags librosprite) \ $(shell xml2-config --cflags) LDFLAGS += $(shell $(PKG_CONFIG) --libs librosprite) @@ -194,7 +194,14 @@ $(DEPROOT)/created: $(OBJROOT)/created WARNFLAGS = -W -Wall -Wundef -Wpointer-arith \ -Wcast-align -Wwrite-strings -Wstrict-prototypes \ -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls \ - -Wnested-externs -Winline -Wno-unused-parameter -Wuninitialized + -Wnested-externs -Winline -Wno-unused-parameter + +OPT0FLAGS = -O0 +# -O and -O2 can use -Wuninitialized which gives us more static checking. +# unfortunately the optimiser is what provides the hints in the code tree +# so we cannot do it when we do -O0 (E.g. debug) +OPTFLAGS = -O -Wuninitialized +OPT2FLAGS = -O2 -Wuninitialized CLEANS := clean-target |