summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-04-17 11:35:52 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-04-17 11:35:52 -0400
commit77f376ef9d4b62747ec3b8cc0abb9c3d2e0bbd6d (patch)
tree92259642eec72a0b9b198385e499de01e3b66b90 /config
parent6917d790e1a76b82e5bc21ed38a38a64cc994d54 (diff)
downloadbfs-77f376ef9d4b62747ec3b8cc0abb9c3d2e0bbd6d.tar.xz
build: Add back the default CFLAGS
Diffstat (limited to 'config')
-rw-r--r--config/flags.mk26
1 files changed, 20 insertions, 6 deletions
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}}