summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-03-22 14:45:27 +0000
committerVincent Sanders <vince@kyllikki.org>2015-03-22 14:45:27 +0000
commit678ec8cc73d54583906a91f68007a8c29ff3d3e2 (patch)
treeb5a1311b7faaf8e5693fe7ff452679a21927f027 /Makefile
parenta27729c436542dd6397c3b1b4e8447f6f6b50e6f (diff)
downloadnsgenbind-678ec8cc73d54583906a91f68007a8c29ff3d3e2.tar.gz
nsgenbind-678ec8cc73d54583906a91f68007a8c29ff3d3e2.tar.bz2
Update CFLAGS to avoid deprication warning for glibc 2.21 and later.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 17 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 5c47f09..a17fedb 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,9 @@
+#!/bin/make
+#
+# Makefile for nsgenbind
+#
+# Copyright 2013-2015 Vincent Sanders <vince@netsurf-browser.org>
+
# Define the component name
COMPONENT := nsgenbind
# And the component type
@@ -16,14 +22,19 @@ TESTRUNNER := test/testrunner.sh
WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs
-# BeOS/Haiku/AmigaOS have standard library errors that issue warnings.
-ifneq ($(BUILD),i586-pc-haiku)
- ifneq ($(findstring amigaos,$(BUILD)),amigaos)
-# WARNFLAGS := $(WARNFLAGS) -Werror
+# Non release variants should make compile warnings errors
+ifneq ($(VARIANT),release)
+ # BeOS/Haiku/AmigaOS have standard library errors that issue warnings.
+ ifneq ($(BUILD),i586-pc-haiku)
+ ifneq ($(findstring amigaos,$(BUILD)),amigaos)
+ WARNFLAGS:= $(WARNFLAGS) -Werror
+ endif
endif
endif
-CFLAGS := -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -I$(CURDIR)/include/ \
- -I$(CURDIR)/src $(WARNFLAGS) $(CFLAGS)
+
+CFLAGS := -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L \
+ -I$(CURDIR)/include/ -I$(CURDIR)/src \
+ $(WARNFLAGS) $(CFLAGS)
ifneq ($(GCCVER),2)
CFLAGS := $(CFLAGS) -std=c99
else