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.
This commit is contained in:
parent
19037cbd83
commit
aaaea44d22
6
mk/cc.mk
6
mk/cc.mk
@ -5,9 +5,9 @@ CFLAGS?= -O2
|
|||||||
|
|
||||||
# Default to using the C99 standard
|
# Default to using the C99 standard
|
||||||
CSTD?= c99
|
CSTD?= c99
|
||||||
_CSTD_SH= if test -n "${CSTD}"; then echo "-std=${CSTD}"; else echo ""; fi
|
ifneq (${CSTD},)
|
||||||
_CSTD:= $(shell ${_CSTD_SH})
|
CFLAGS+= -std=${CSTD}
|
||||||
CFLAGS+= ${_CSTD}
|
endif
|
||||||
|
|
||||||
# Try and use some good cc flags if we're building from git
|
# 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
|
# We don't use -pedantic as it will warn about our perfectly valid
|
||||||
|
Loading…
Reference in New Issue
Block a user