summaryrefslogtreecommitdiffstats
path: root/build/flags.mk
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-09-05 15:07:07 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-09-05 15:07:07 -0400
commitacc27139f66a9792a8a2e710ca5d14b88e6eb726 (patch)
tree0002760dedd19f83423b7c15f697f7fcb3c9ae73 /build/flags.mk
parent812ecd1feeb002252dd4d732b395d31c4179afaf (diff)
downloadbfs-acc27139f66a9792a8a2e710ca5d14b88e6eb726.tar.xz
build/flags: Use auto-detection for all warning flags
Diffstat (limited to 'build/flags.mk')
-rw-r--r--build/flags.mk22
1 files changed, 10 insertions, 12 deletions
diff --git a/build/flags.mk b/build/flags.mk
index afe19bc..1421ce6 100644
--- a/build/flags.mk
+++ b/build/flags.mk
@@ -67,16 +67,7 @@ _CPPFLAGS += ${RELEASE_CPPFLAGS,${_RELEASE}}
_CFLAGS += ${RELEASE_CFLAGS,${_RELEASE}}
# Configurable flags
-CFLAGS ?= \
- -g \
- -Wall \
- -Wformat=2 \
- -Werror=implicit \
- -Wimplicit-fallthrough \
- -Wmissing-declarations \
- -Wshadow \
- -Wsign-compare \
- -Wstrict-prototypes
+CFLAGS ?= -g -Wall
# Add the configurable flags last so they can override ours
_CPPFLAGS += ${CPPFLAGS} ${EXTRA_CPPFLAGS}
@@ -89,9 +80,16 @@ include build/exports.mk
# Conditionally-supported flags
AUTO_FLAGS := \
+ gen/flags/Wformat.mk \
+ gen/flags/Wimplicit-fallthrough.mk \
+ gen/flags/Wimplicit.mk \
+ gen/flags/Wmissing-decls.mk \
+ gen/flags/Wmissing-var-decls.mk \
+ gen/flags/Wshadow.mk \
+ gen/flags/Wsign-compare.mk \
+ gen/flags/Wstrict-prototypes.mk \
gen/flags/bind-now.mk \
- gen/flags/deps.mk \
- gen/flags/missing-var-decls.mk
+ gen/flags/deps.mk
gen/flags.mk: ${AUTO_FLAGS}
${MSG} "[ GEN] $@"