diff options
author | Vincent Sanders <vince@kyllikki.org> | 2015-03-22 14:45:27 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-03-22 14:45:27 +0000 |
commit | 678ec8cc73d54583906a91f68007a8c29ff3d3e2 (patch) | |
tree | b5a1311b7faaf8e5693fe7ff452679a21927f027 | |
parent | a27729c436542dd6397c3b1b4e8447f6f6b50e6f (diff) | |
download | nsgenbind-678ec8cc73d54583906a91f68007a8c29ff3d3e2.tar.gz nsgenbind-678ec8cc73d54583906a91f68007a8c29ff3d3e2.tar.bz2 |
Update CFLAGS to avoid deprication warning for glibc 2.21 and later.
-rw-r--r-- | Makefile | 23 |
1 files changed, 17 insertions, 6 deletions
@@ -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 |