summaryrefslogtreecommitdiffstatshomepage
path: root/makefile
diff options
context:
space:
mode:
authorGravatarGravatar Vas Crabb <vas@vastheman.com>2017-01-02 18:41:42 +1100
committerGravatarGravatar Vas Crabb <vas@vastheman.com>2017-01-02 18:41:42 +1100
commit304836a55c66a04f3ddb509329799bab222f1666 (patch)
treecba242dac1e6b0b5df2607d9b8fb56901c20a571 /makefile
parentcd4e68a120f5e1871da8ac54593e89df70527ecd (diff)
make DEBUG=0 and SYMBOLS=0 behave (nw)
Diffstat (limited to 'makefile')
-rw-r--r--makefile17
1 files changed, 9 insertions, 8 deletions
diff --git a/makefile b/makefile
index 3d55d51d506..1c3c47b793b 100644
--- a/makefile
+++ b/makefile
@@ -235,8 +235,10 @@ SUBTARGET_FULL := $(subst -,_,$(SUBTARGET))
CONFIG = release
ifdef DEBUG
+ifneq '$(DEBUG)' '0'
CONFIG := debug
endif
+endif
ifdef VERBOSE
MAKEPARAMS += verbose=1
@@ -511,19 +513,18 @@ endif
# profiler defaults to on for DEBUG builds
ifdef DEBUG
+ifneq '$(DEBUG)' '0'
ifndef PROFILER
PROFILER = 1
endif
endif
+endif
# allow gprof profiling as well, which overrides the internal PROFILER
# also enable symbols as it is useless without them
ifdef PROFILE
PROFILER =
SYMBOLS = 1
-ifndef SYMLEVEL
-SYMLEVEL = 1
-endif
endif
# specify a default optimization level if none explicitly stated
@@ -533,10 +534,14 @@ endif
# set the symbols level
ifdef SYMBOLS
+PARAMS += --SYMBOLS='$(SYMBOLS)'
+ifneq '$(SYMBOLS)' '0'
ifndef SYMLEVEL
-SYMLEVEL = 1
ifdef SOURCES
SYMLEVEL = 2
+else
+SYMLEVEL = 1
+endif
endif
endif
endif
@@ -559,10 +564,6 @@ PARAMS += --with-benchmarks
endif
endif
-ifdef SYMBOLS
-PARAMS += --SYMBOLS='$(SYMBOLS)'
-endif
-
ifdef SYMLEVEL
PARAMS += --SYMLEVEL='$(SYMLEVEL)'
endif