From 1a9f4f8a1bd0abf187b987bd99b5fd6deb829cdd Mon Sep 17 00:00:00 2001 From: Oliver Brakmann Date: Sun, 7 Jun 2015 12:53:04 +0200 Subject: [PATCH] Allow switching off debug compilation in the Makefile Debug mode stays enabled by default. Turn it off by passing a DEBUG flag into make, eg.: $ make DEBUG=0 --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5ca403b563..26f06759da 100644 --- a/Makefile +++ b/Makefile @@ -38,10 +38,18 @@ ############################## TOOLCHAIN ############################### # CSC = dmcs -CSFLAGS = -nologo -warn:4 -debug:pdbonly -optimize+ -codepage:utf8 -unsafe -warnaserror +CSFLAGS = -nologo -warn:4 -codepage:utf8 -unsafe -warnaserror DEFINE = TRACE COMMON_LIBS = System.dll System.Core.dll System.Data.dll System.Data.DataSetExtensions.dll System.Drawing.dll System.Xml.dll thirdparty/download/ICSharpCode.SharpZipLib.dll thirdparty/download/FuzzyLogicLibrary.dll thirdparty/download/Mono.Nat.dll thirdparty/download/MaxMind.Db.dll thirdparty/download/MaxMind.GeoIP2.dll thirdparty/download/Eluant.dll +DEBUG = true +ifeq ($(DEBUG), $(filter $(DEBUG),false no n off 0)) +CSCFLAGS += -debug:pdbonly -optimize+ +else +CSCFLAGS += -debug:full -optimize- +DEFINE := DEBUG;$(DEFINE) +endif + ######################### UTILITIES/SETTINGS ###########################