Skip to content

Commit

Permalink
add DEBUG option to Makefile/Makefile.config.example
Browse files Browse the repository at this point in the history
This allows debugging to be toggled without dirtying the tree.
  • Loading branch information
longjon committed Mar 28, 2014
1 parent 18d1e96 commit c8ec12c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions Makefile.config.example
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ LIBRARY_DIRS := $(PYTHON_LIB) /usr/lib /usr/local/lib

BUILD_DIR := build
DISTRIBUTE_DIR := distribute

# uncomment for debugging
#DEBUG := 1

0 comments on commit c8ec12c

Please sign in to comment.