about summary refs log tree commit diff stats
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/makefile b/makefile
index c7d9caf..a4cec5a 100644
--- a/makefile
+++ b/makefile
@@ -1,6 +1,11 @@
 CC:=clang
+ifeq ($(DEBUG),1)
+CFLAGS:=-march=native -fsanitize=address -funroll-loops -Wall -Wextra -Werror -O1
+LDFLAGS:=-lpthread
+else
 CFLAGS:=-march=native -O3 -funroll-loops -Wall -Wextra -Werror
 LDFLAGS:=-flto=thin -lpthread
+endif
 
 ifeq ($(shell uname),SunOS)
 CC = gcc