summaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-02-10 12:56:35 +0100
committerTor Andersson <tor.andersson@artifex.com>2016-02-10 12:56:35 +0100
commit9af771284d7e74d7e1685872f14dd970dc8b0aec (patch)
treeadc262aeb6cf07c624a9ae4079d2a6dc90ad5cc4 /Makerules
parentd6e80a252e0c20636f38985438fbbd944037bc27 (diff)
downloadmupdf-9af771284d7e74d7e1685872f14dd970dc8b0aec.tar.xz
Add build=sanitize option to makefile.
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makerules b/Makerules
index 5b3d4fc1..013b2e20 100644
--- a/Makerules
+++ b/Makerules
@@ -9,11 +9,14 @@ CFLAGS += -Wall
ifeq "$(build)" "debug"
CFLAGS += -pipe -g -DDEBUG
+else ifeq "$(build)" "release"
+CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer
+else ifeq "$(build)" "sanitize"
+CFLAGS += -pipe -g -DDEBUG -fsanitize=address -fno-omit-frame-pointer
+LDFLAGS += -fsanitize=address
else ifeq "$(build)" "profile"
CFLAGS += -pipe -O2 -DNDEBUG -pg
LDFLAGS += -pg
-else ifeq "$(build)" "release"
-CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer
else ifeq "$(build)" "coverage"
CFLAGS += -pipe -g -DDEBUG -pg -fprofile-arcs -ftest-coverage
LIBS += -lgcov