From 222c1797c96c492b133c419ca693c7894643b270 Mon Sep 17 00:00:00 2001 From: François Revel Date: Tue, 17 Apr 2012 19:07:12 +0000 Subject: Don't use -std=c99 for gcc2. Oddly ZETA's gcc2 didn't really care, but Haiku's does. svn path=/trunk/libdom/; revision=13878 --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8a1b447..368d3d2 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ TESTRUNNER := $(PERL) build/testtools/testrunner.pl WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \ -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \ -Wmissing-declarations -Wnested-externs -# BeOS/Haiku standard library headers create warnings +# BeOS/Haiku standard library headers generate warnings ifneq ($(TARGET),beos) WARNFLAGS := $(WARNFLAGS) -Werror endif @@ -21,8 +21,12 @@ endif ifeq ($(TARGET),amiga) CFLAGS := -U__STRICT_ANSI__ $(CFLAGS) endif -CFLAGS := -std=c99 -D_BSD_SOURCE -I$(CURDIR)/include/ \ +CFLAGS := -D_BSD_SOURCE -I$(CURDIR)/include/ \ -I$(CURDIR)/src -I$(CURDIR)/binding $(WARNFLAGS) $(CFLAGS) +# Some gcc2 versions choke on -std=c99, and it doesn't know about it anyway +ifneq ($(GCCVER),2) + CFLAGS := -std=c99 $(CFLAGS) +endif # Parserutils & wapcaplet ifneq ($(findstring clean,$(MAKECMDGOALS)),clean) -- cgit v1.2.3