aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index fd695d7..4516e85 100644
--- a/Makefile
+++ b/Makefile
@@ -34,10 +34,15 @@ endif
#
# keep standard at C11 and C++11
-CFLAGS = -I. -O3 -DNDEBUG -std=c11 -fPIC
-CXXFLAGS = -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC
+CFLAGS = -I. -O3 -std=c11 -fPIC
+CXXFLAGS = -I. -I./examples -O3 -std=c++11 -fPIC
LDFLAGS =
+ifndef LLAMA_DEBUG
+ CFLAGS += -DNDEBUG
+ CXXFLAGS += -DNDEBUG
+endif
+
# warnings
CFLAGS += -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith
CXXFLAGS += -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar