diff options
author | William Hubbs <williamh@gentoo.org> | 2011-02-02 14:57:10 -0600 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2011-02-04 22:26:23 -0600 |
commit | aaaea44d224016bccfd008d0b904961f788d8189 (patch) | |
tree | 06879ec6988cad2d502a98cc99dedf9c14788411 /mk/cc.mk | |
parent | 19037cbd83ee46f2c3510925c83cc89d27d16ac6 (diff) |
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.
Diffstat (limited to 'mk/cc.mk')
-rw-r--r-- | mk/cc.mk | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |