aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohannes Gäßler <johannesg@5d6.de>2023-05-28 21:01:02 +0200
committerGitHub <noreply@github.com>2023-05-28 21:01:02 +0200
commit3b126f654fceb4f5f195a1c2e825bb18e101188c (patch)
tree89156fdabb25f0ce4eb845d63f3aa3cf32e70235 /Makefile
parent1b78ed20818b72306edc7208b9bfb69a1a0d3297 (diff)
LLAMA_DEBUG adds debug symbols (#1617)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 70bd5e9..8e8d426 100644
--- a/Makefile
+++ b/Makefile
@@ -44,7 +44,11 @@ CFLAGS = -I. -O3 -std=c11 -fPIC
CXXFLAGS = -I. -I./examples -O3 -std=c++11 -fPIC
LDFLAGS =
-ifndef LLAMA_DEBUG
+ifdef LLAMA_DEBUG
+ CFLAGS += -O0 -g
+ CXXFLAGS += -O0 -g
+ LDFLAGS += -g
+else
CFLAGS += -DNDEBUG
CXXFLAGS += -DNDEBUG
endif