summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJonathan L Long <jonlong@cs.berkeley.edu>2014-03-21 15:15:00 -0700
committerJonathan L Long <jonlong@cs.berkeley.edu>2014-03-27 20:15:32 -0700
commitc8ec12c5cb7f50feb60b3873da9526e0b756e8ad (patch)
tree0510c29ee4bb463e7485edf04c663d8dc2b415d8 /Makefile
parent18d1e96edc4d36781974f5ef522eb0932997bf94 (diff)
downloadcaffe-c8ec12c5cb7f50feb60b3873da9526e0b756e8ad.tar.gz
caffe-c8ec12c5cb7f50feb60b3873da9526e0b756e8ad.tar.bz2
caffe-c8ec12c5cb7f50feb60b3873da9526e0b756e8ad.zip
add DEBUG option to Makefile/Makefile.config.example
This allows debugging to be toggled without dirtying the tree.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index e61fb63a..acef07d6 100644
--- a/Makefile
+++ b/Makefile
@@ -97,7 +97,11 @@ LIBRARIES := cudart cublas curand \
PYTHON_LIBRARIES := boost_python python2.7
WARNINGS := -Wall
-COMMON_FLAGS := -DNDEBUG -O2
+ifdef DEBUG
+ COMMON_FLAGS := -DDEBUG -g -O0
+else
+ COMMON_FLAGS := -DNDEBUG -O2
+endif
# MKL switch (default = non-MKL)
USE_MKL ?= 0