Makefile: Set debug mode
This commit is contained in:
parent
2e492eb835
commit
15669d20b4
31
Makefile
31
Makefile
|
@ -5,8 +5,37 @@ ifndef HAVE_RULES
|
||||||
HAVE_RULES=no
|
HAVE_RULES=no
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifndef COMSPEC
|
||||||
|
ifdef ComSpec
|
||||||
|
#### ComSpec is defined on some WIN32's.
|
||||||
|
COMSPEC=$(ComSpec)
|
||||||
|
endif # ComSpec
|
||||||
|
endif # COMSPEC
|
||||||
|
|
||||||
|
ifdef COMSPEC
|
||||||
|
#### Maybe Windows
|
||||||
|
ifndef CPPCHK_GLIBCXX_DEBUG
|
||||||
|
CPPCHK_GLIBCXX_DEBUG=
|
||||||
|
endif # !CPPCHK_GLIBCXX_DEBUG
|
||||||
|
else # !COMSPEC
|
||||||
|
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
|
||||||
|
|
||||||
|
ifeq ($(uname_S),Linux)
|
||||||
|
ifndef CPPCHK_GLIBCXX_DEBUG
|
||||||
|
CPPCHK_GLIBCXX_DEBUG=-D_GLIBCXX_DEBUG
|
||||||
|
endif # !CPPCHK_GLIBCXX_DEBUG
|
||||||
|
endif # Linux
|
||||||
|
|
||||||
|
ifeq ($(uname_S),GNU/kFreeBSD)
|
||||||
|
ifndef CPPCHK_GLIBCXX_DEBUG
|
||||||
|
CPPCHK_GLIBCXX_DEBUG=-D_GLIBCXX_DEBUG
|
||||||
|
endif # !CPPCHK_GLIBCXX_DEBUG
|
||||||
|
endif # GNU/kFreeBSD
|
||||||
|
|
||||||
|
endif # COMSPEC
|
||||||
|
|
||||||
ifndef CXXFLAGS
|
ifndef CXXFLAGS
|
||||||
CXXFLAGS=-O2 -DNDEBUG -Wall
|
CXXFLAGS=-pedantic -Wall -Wextra -Wabi -Wcast-qual -Wfloat-equal -Winline -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Woverloaded-virtual -Wpacked -Wredundant-decls -Wshadow -Wsign-promo $(CPPCHK_GLIBCXX_DEBUG) -g
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(HAVE_RULES),yes)
|
ifeq ($(HAVE_RULES),yes)
|
||||||
|
|
Loading…
Reference in New Issue