From 77f376ef9d4b62747ec3b8cc0abb9c3d2e0bbd6d Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 17 Apr 2024 11:35:52 -0400 Subject: build: Add back the default CFLAGS --- config/flags.mk | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'config/flags.mk') diff --git a/config/flags.mk b/config/flags.mk index e62e26e..2c91691 100644 --- a/config/flags.mk +++ b/config/flags.mk @@ -6,6 +6,26 @@ include config/prelude.mk include ${GEN}/vars.mk +# Configurable flags +CPPFLAGS ?= +CFLAGS ?= \ + -g \ + -Wall \ + -Wformat=2 \ + -Werror=implicit \ + -Wimplicit-fallthrough \ + -Wmissing-declarations \ + -Wshadow \ + -Wsign-compare \ + -Wstrict-prototypes +LDFLAGS ?= +LDLIBS ?= + +export XCPPFLAGS=${CPPFLAGS} +export XCFLAGS=${CFLAGS} +export XLDFLAGS=${LDFLAGS} +export XLDLIBS=${LDLIBS} + # Immutable flags export BFS_CPPFLAGS= \ -D__EXTENSIONS__ \ @@ -27,12 +47,6 @@ LDLIBS,NetBSD := -lutil LDLIBS,SunOS := -lsocket -lnsl export BFS_LDLIBS=${LDLIBS,${OS}} -# Make sure we pick up any default flags from e.g. sys.mk -export XCPPFLAGS=${CPPFLAGS} -export XCFLAGS=${CFLAGS} -export XLDFLAGS=${LDFLAGS} -export XLDLIBS=${LDLIBS} - # Build profiles _ASAN := ${TRUTHY,${ASAN}} _LSAN := ${TRUTHY,${LSAN}} -- cgit v1.2.3