]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Linux-2.6.23 finally supports -std=c99 for asm/types.h, included by headers we include.
authorRoy Marples <roy@marples.name>
Tue, 19 Feb 2008 17:35:31 +0000 (17:35 +0000)
committerRoy Marples <roy@marples.name>
Tue, 19 Feb 2008 17:35:31 +0000 (17:35 +0000)
mk/cc.mk

index 225b11045e84ef94213e296e0065d93f9eabc2da..4fcdcfcb5d3018ab613c8b2a5c9c8286f3503232 100644 (file)
--- a/mk/cc.mk
+++ b/mk/cc.mk
@@ -1,9 +1,14 @@
 # Copyright 2008 Roy Marples <roy@marples.name>
 
 # Setup some good default CFLAGS
-
 CFLAGS?=       -O2 -pipe
 
+# Default to using the C99 standard
+CSTD?=         c99
+_CSTD_SH=      if test -n "${CSTD}"; then echo "-std=${CSTD}"; else echo ""; fi
+_CSTD!=                ${_CSTD_SH}
+CFLAGS+=       ${_CSTD}$(shell _CSTD_SH)
+
 # GNU Make way of detecting gcc flags we can use
 check_gcc=$(shell if ${CC} $(1) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \
        then echo "$(1)"; else echo "$(2)"; fi)