diff options
Diffstat (limited to 'config/flags.mk')
-rw-r--r-- | config/flags.mk | 26 |
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}} |