aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)