Add ENABLE_DEBUG config flag

This commit is contained in:
Clifford Wolf 2017-10-25 14:57:16 +02:00
parent af36755e0a
commit 9a038861c8
1 changed files with 10 additions and 1 deletions

View File

@ -17,6 +17,7 @@ ENABLE_LIBYOSYS := 0
# other configuration flags
ENABLE_GPROF := 0
ENABLE_DEBUG := 0
ENABLE_NDEBUG := 0
LINK_CURSES := 0
LINK_TERMCAP := 0
@ -251,7 +252,15 @@ LDFLAGS += -pg
endif
ifeq ($(ENABLE_NDEBUG),1)
CXXFLAGS := -O3 -DNDEBUG $(filter-out -Os,$(CXXFLAGS))
CXXFLAGS := -O3 -DNDEBUG $(filter-out -Os -ggdb,$(CXXFLAGS))
endif
ifeq ($(ENABLE_DEBUG),1)
ifeq ($(CONFIG),clang)
CXXFLAGS := -O0 $(filter-out -Os,$(CXXFLAGS))
else
CXXFLAGS := -Og $(filter-out -Os,$(CXXFLAGS))
endif
endif
ifeq ($(ENABLE_ABC),1)