From 1824ae8d9d3e8c6117a055164d6bc2073a46f918 Mon Sep 17 00:00:00 2001 From: danieldg Date: Fri, 19 Feb 2010 16:31:47 +0000 Subject: Disable -O2 when compiling with full debug, allow make D=2 to enable debug+optimize git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12498 e03df62e-2008-0410-955e-edbf42e46eb7 --- make/template/main.mk | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'make') 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 -- cgit v1.2.3