configure: include -std=c99 in config.mk

So other makefiles can use it, e.g. the one in external/lua
This commit is contained in:
Jeremy Baxter 2024-02-18 17:19:15 +13:00
parent 8568ca2fb3
commit d4ec5248fe
2 changed files with 5 additions and 3 deletions

View file

@ -4,7 +4,8 @@ PREFIX = /usr/local
MANPREFIX = ${PREFIX}/man MANPREFIX = ${PREFIX}/man
CC = ${_CC} CC = ${_CC}
CFLAGS = -std=c99 ${_CFLAGS} -pedantic -Iexternal/lua -Wall -Wextra -D_DEFAULT_SOURCE CFLAGS = ${_CFLAGS} -Iexternal/lua -pedantic -Wall -Wextra
CPPFLAGS = -D_DEFAULT_SOURCE
LDFLAGS = -lm ${_LDFLAGS} LDFLAGS = -lm ${_LDFLAGS}
OBJS = callisto.o lcl.o lenviron.o lextra.o lfs.o ljson.o lprocess.o util.o OBJS = callisto.o lcl.o lenviron.o lextra.o lfs.o ljson.o lprocess.o util.o

5
configure vendored
View file

@ -5,6 +5,7 @@
set -e set -e
mkf=config.mk mkf=config.mk
cflags='-std=c99' # set here to apply to all subtrees
# utility functions # utility functions
@ -43,9 +44,9 @@ gen_CC () {
## flags used in the compilation step ## flags used in the compilation step
gen_CFLAGS () { gen_CFLAGS () {
if [ -z "$debug" ]; then if [ -z "$debug" ]; then
cflags="-O2" cflags="$cflags -O3"
else else
cflags="-O0 -g" cflags="$cflags -O0 -g"
fi fi
for flag in $cflags; do for flag in $cflags; do