Skip to content

Commit

Permalink
make DEBUG=0 and SYMBOLS=0 behave (nw)
Browse files Browse the repository at this point in the history
  • Loading branch information
cuavas committed Jan 2, 2017
1 parent cd4e68a commit 304836a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions makefile
Expand Up @@ -235,8 +235,10 @@ SUBTARGET_FULL := $(subst -,_,$(SUBTARGET))

CONFIG = release
ifdef DEBUG
ifneq '$(DEBUG)' '0'
CONFIG := debug
endif
endif

ifdef VERBOSE
MAKEPARAMS += verbose=1
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -559,10 +564,6 @@ PARAMS += --with-benchmarks
endif
endif

ifdef SYMBOLS
PARAMS += --SYMBOLS='$(SYMBOLS)'
endif

ifdef SYMLEVEL
PARAMS += --SYMLEVEL='$(SYMLEVEL)'
endif
Expand Down

0 comments on commit 304836a

Please sign in to comment.