summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
Diffstat (limited to 'make')
-rw-r--r--make/template/main.mk23
1 files changed, 13 insertions, 10 deletions
diff --git a/make/template/main.mk b/make/template/main.mk
index 9852f8919..d9b57a17b 100644
--- a/make/template/main.mk
+++ b/make/template/main.mk
@@ -51,20 +51,23 @@ INSTMODE_LIB = 0644
CXXFLAGS += -D_ALL_SOURCE -I/usr/local/include
@ENDIF
-@IFDEF D
- CXXFLAGS += -g3 -Werror
- HEADER = debug-header
-@ELSE
- CXXFLAGS += -g1
- HEADER = std-header
+@IFNDEF D
+ D=0
@ENDIF
-FOOTER = finishmessage
-@IFDEF QUICK
- CXXFLAGS += -O0
+@IFEQ $(D) 0
+ CXXFLAGS += -O2 -g1
+ HEADER = std-header
+@ELSIFEQ $(D) 1
+ CXXFLAGS += -O0 -g3 -Werror
+ HEADER = debug-header
+@ELSIFEQ $(D) 2
+ CXXFLAGS += -O2 -g3
+ HEADER = debug-header
@ELSE
- CXXFLAGS += -O2
+ HEADER = unknown-debug-level
@ENDIF
+FOOTER = finishmessage
CXXFLAGS += -Iinclude