summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2020-11-30 10:25:54 -0500
committerTavian Barnes <tavianator@tavianator.com>2020-11-30 10:26:14 -0500
commitd1dd775554c15bbf2e97b163806bc6dc4bd3596f (patch)
treee9ee164f7bb79b1eae95898b3682e9c171a9c73a
parentb9beae67a1dce1cc957a2a780c26ce0ca3afc70c (diff)
downloadbfs-d1dd775554c15bbf2e97b163806bc6dc4bd3596f.tar.xz
Makefile: Clean up flag handling a bit
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index cff49e5..3dd263f 100644
--- a/Makefile
+++ b/Makefile
@@ -33,8 +33,9 @@ INSTALL ?= install
MKDIR ?= mkdir -p
RM ?= rm -f
-WFLAGS ?= -Wall -Wmissing-declarations -Wstrict-prototypes -Wsign-compare
-CFLAGS ?= -g $(WFLAGS)
+DEFAULT_CFLAGS ?= -g -Wall -Wmissing-declarations -Wstrict-prototypes -Wsign-compare
+
+CFLAGS ?= $(DEFAULT_CFLAGS)
LDFLAGS ?=
DEPFLAGS ?= -MD -MP -MF $(@:.o=.d)
@@ -59,7 +60,6 @@ LOCAL_LDLIBS :=
ASAN_CFLAGS := -fsanitize=address
MSAN_CFLAGS := -fsanitize=memory -fsanitize-memory-track-origins
UBSAN_CFLAGS := -fsanitize=undefined
-SANFLAGS := -fno-sanitize-recover
ifeq ($(OS),Linux)
LOCAL_LDFLAGS += -Wl,--as-needed
@@ -97,7 +97,7 @@ LOCAL_CFLAGS += --coverage
endif
ifneq ($(filter release,$(MAKECMDGOALS)),)
-CFLAGS := -g $(WFLAGS) -O3 -flto -DNDEBUG
+CFLAGS := $(DEFAULT_CFLAGS) -O3 -flto -DNDEBUG
endif
ALL_CPPFLAGS = $(LOCAL_CPPFLAGS) $(CPPFLAGS)