aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index b6f3143..ddfa2b3 100644
--- a/Makefile
+++ b/Makefile
@@ -90,8 +90,10 @@ mlx:
# =============================================================================
# Debug build
# =============================================================================
-debug: CFLAGS = -Wall -Wextra -g -O0 -DDEBUG -fsanitize=address
-debug: LDFLAGS += -fsanitize=address
+SANITIZE ?= address,undefined
+
+debug: CFLAGS = -Wall -Wextra -g -O0 -DDEBUG -fsanitize=$(SANITIZE)
+debug: LDFLAGS += -fsanitize=$(SANITIZE)
debug:
$(MAKE) clean
$(MAKE) $(TARGET) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"