summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-11-06 07:05:53 (GMT)
committer John Mark Bell <jmb@netsurf-browser.org>2009-11-06 07:05:53 (GMT)
commit470b8a37ecade509f16dad398d4d33000b05ddfb (patch)
tree4a13eecb7ace9ed4aa7a2706ee637f656f78ae49
parent2ce61b934d6bc02e64fb0383bcbbeb020bf72293 (diff)
downloadlibwapcaplet-470b8a37ecade509f16dad398d4d33000b05ddfb.tar.gz
libwapcaplet-470b8a37ecade509f16dad398d4d33000b05ddfb.tar.bz2
-Wextra is only understood by GCC 3.4.6 or later.
It is a more descriptive synonym for -W. Use -W instead which is understood by all common versions of GCC (i.e. GCC 2.95 supports it, which is the oldest GCC version we have to support) Additionally, conditionalise our -Werror usage on whether we're building for BeOS/Haiku. On these platforms, the standard library headers result in warnings. GCC 2 is quite happy to build this code on other platforms, so shouldn't be the trigger for dropping -Werror (even if BeOS is the only target where GCC2 is likely to be used). svn path=/trunk/libwapcaplet/; revision=9671
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index ffb84c1..e7fb196 100644
--- a/Makefile
+++ b/Makefile
@@ -11,11 +11,12 @@ include build/makefiles/Makefile.tools
TESTRUNNER = $(BUILDDIR)/test_testrunner$(EXEEXT)
# Toolchain flags
-WARNFLAGS := -Wall -Wundef -Wpointer-arith -Wcast-align \
+WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
- -Wmissing-declarations -Wnested-externs -Werror -pedantic
-ifneq ($(GCCVER),2)
- WARNFLAGS := $(WARNFLAGS) -Wextra
+ -Wmissing-declarations -Wnested-externs -pedantic
+# BeOS/Haiku standard library headers issue warnings
+ifneq ($(TARGET),beos)
+ WARNFLAGS := $(WARNFLAGS) -Werror
endif
CFLAGS := -D_BSD_SOURCE -I$(CURDIR)/include/ \
-I$(CURDIR)/src $(WARNFLAGS) $(CFLAGS)