From aaaea44d224016bccfd008d0b904961f788d8189 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Wed, 2 Feb 2011 14:57:10 -0600 Subject: use make conditional for -cstd flag cc.mk was using ashell call to determine the value of the cstd variable. This reworks that code so it uses a make conditional. --- mk/cc.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mk/cc.mk b/mk/cc.mk index 74a816e9..06556f0e 100644 --- a/mk/cc.mk +++ b/mk/cc.mk @@ -5,9 +5,9 @@ CFLAGS?= -O2 # Default to using the C99 standard CSTD?= c99 -_CSTD_SH= if test -n "${CSTD}"; then echo "-std=${CSTD}"; else echo ""; fi -_CSTD:= $(shell ${_CSTD_SH}) -CFLAGS+= ${_CSTD} +ifneq (${CSTD},) +CFLAGS+= -std=${CSTD} +endif # Try and use some good cc flags if we're building from git # We don't use -pedantic as it will warn about our perfectly valid -- cgit v1.2.3