aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2023-07-03 18:20:32 +0200
committerJohannes Stoelp <johannes.stoelp@gmail.com>2023-07-03 18:21:58 +0200
commit966eb6646450fec69cbd4b314d1c48afdfcd6330 (patch)
tree4b1f9b7f3c1a9141644e00fe57080812fdde6079 /Makefile
parentd9743696562fc85643e016d778ee994f0b9296db (diff)
downloadcpp-utils-966eb6646450fec69cbd4b314d1c48afdfcd6330.tar.gz
cpp-utils-966eb6646450fec69cbd4b314d1c48afdfcd6330.zip
enable asa/lsan/ubsan
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 3f0706e..b5d6cf8 100644
--- a/Makefile
+++ b/Makefile
@@ -8,10 +8,11 @@ DEPS = $(TEST:%=build/%.d)
# -- FLAGS ---------------------------------------------------------------------
-DEPS_GEN = -MMD
-CXXFLAGS = -g -Wall -Wextra -Werror -I. -std=c++14 $(DEPS_GEN)
+DEPS_GEN = -MMD
+SANITIZER = -fsanitize=address -fsanitize=undefined -fsanitize=leak -fno-omit-frame-pointer
-# -- RULES ---------------------------------------------------------------------
+CXXFLAGS = -Og -g -Wall -Wextra -Werror -I. -std=c++14 $(DEPS_GEN) $(SANITIZER)
+LDFLAGS = $(SANITIZER)
all: build $(BINS)
@@ -20,7 +21,7 @@ bear:
bear citnames
build/%: build/%.o
- $(CXX) -o $@ $<
+ $(CXX) -o $@ $< $(LDFLAGS)
build/%.o: test/%.cc
$(CXX) -c -o $@ $< $(CXXFLAGS)