From d4ec5248fe511e0e5ecd4586b25a0226fa226294 Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Sun, 18 Feb 2024 17:19:15 +1300 Subject: [PATCH] configure: include -std=c99 in config.mk So other makefiles can use it, e.g. the one in external/lua --- Makefile | 3 ++- configure | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0ec102e..caffd18 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,8 @@ PREFIX = /usr/local MANPREFIX = ${PREFIX}/man 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} OBJS = callisto.o lcl.o lenviron.o lextra.o lfs.o ljson.o lprocess.o util.o diff --git a/configure b/configure index b49e800..17f0597 100755 --- a/configure +++ b/configure @@ -5,6 +5,7 @@ set -e mkf=config.mk +cflags='-std=c99' # set here to apply to all subtrees # utility functions @@ -43,9 +44,9 @@ gen_CC () { ## flags used in the compilation step gen_CFLAGS () { if [ -z "$debug" ]; then - cflags="-O2" + cflags="$cflags -O3" else - cflags="-O0 -g" + cflags="$cflags -O0 -g" fi for flag in $cflags; do