From bec8d601c2b5b4a356388fe793796699f662ccd9 Mon Sep 17 00:00:00 2001 From: kichik Date: Thu, 30 Sep 2004 13:15:22 +0000 Subject: [PATCH] added DEBUG and PROFILING flags git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3678 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/Makefile | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/Source/Makefile b/Source/Makefile index 4c2c2401..7b4be405 100644 --- a/Source/Makefile +++ b/Source/Makefile @@ -23,13 +23,34 @@ RM = rm # -- Compilers and linker flags -- DEFINES = -DCOMPRESS_MF_BT -CFLAGS = -Wall -O3 -CXXFLAGS = -Wall -O3 +CFLAGS += -Wall +CXXFLAGS += -Wall CPPFLAGS = $(DEFINES) +RELEASE = 1 ifneq ($(EXESUFF),) - LDFLAGS = -s -Wl,-Map,$(subst $(EXESUFF),.map,$@) + LDFLAGS += -Wl,-Map,$(subst $(EXESUFF),.map,$@) else - LDFLAGS = -s -Wl,-Map,$@.map + LDFLAGS += -Wl,-Map,$@.map +endif + +ifeq ($(PROFILING),1) + CFLAGS += -g -pg -O3 + CXXFLAGS += -g -pg -O3 + LDFLAGS += -g -pg + RELEASE = 0 +endif + +ifeq ($(DEBUG),1) + CFLAGS += -g -O0 + CXXFLAGS += -g -O0 + LDFLAGS += -g + RELEASE = 0 +endif + +ifeq ($(RELEASE),1) + CFLAGS += -O3 + CXXFLAGS += -O3 + LDFLAGS += -s endif all : exehead makensis