diff options
author | Vincent Sanders <vince@kyllikki.org> | 2015-03-22 12:30:59 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-03-22 12:30:59 +0000 |
commit | 596eeb57dc79eb4ad8293282639194ae5bb7e12e (patch) | |
tree | 92c28e823b416a06a6f0b010b67d68429c9de768 /Makefile | |
parent | 37d7affb1f6434647547c3183e30991d551fbc01 (diff) | |
download | libnsfb-596eeb57dc79eb4ad8293282639194ae5bb7e12e.tar.gz libnsfb-596eeb57dc79eb4ad8293282639194ae5bb7e12e.tar.bz2 |
Update CFLAGS to avoid deprication warning for glibc 2.21 and later.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 25 |
1 files changed, 21 insertions, 4 deletions
@@ -1,3 +1,9 @@ +#!/bin/make +# +# Makefile for libnsfb +# +# Copyright 2013-2015 Vincent Sanders <vince@netsurf-browser.org> + # Component settings COMPONENT := nsfb COMPONENT_VERSION := 0.1.3 @@ -15,13 +21,24 @@ TESTRUNNER = test/runtest.sh $(BUILDDIR) $(EXEEXT) # Toolchain flags WARNFLAGS := -Wall -Wextra -Wundef -Wpointer-arith -Wcast-align \ -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \ - -Wmissing-declarations -Wnested-externs -Werror - + -Wmissing-declarations -Wnested-externs +# Non release variants should make compile warnings errors +ifneq ($(VARIANT),release) + WARNFLAGS:= $(WARNFLAGS) -Werror +endif # would like these flags but gcc earlier than 4.4 fail #-pedantic -Wno-overlength-strings # For nsglobe.c -CFLAGS := -g -std=c99 -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112L \ - -I$(CURDIR)/include/ -I$(CURDIR)/src $(WARNFLAGS) $(CFLAGS) -Wno-error +CFLAGS := -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112L \ + -I$(CURDIR)/include/ -I$(CURDIR)/src \ + $(WARNFLAGS) $(CFLAGS) +# Cope with gcc 2 +ifneq ($(GCCVER),2) + CFLAGS := $(CFLAGS) -std=c99 +else + # __inline__ is a GCCism + CFLAGS := $(CFLAGS) -Dinline="__inline__" +endif NSFB_XCB_PKG_NAMES := xcb xcb-icccm xcb-image xcb-keysyms xcb-atom |