aboutsummaryrefslogtreecommitdiffstats
path: root/config.nmake
diff options
context:
space:
mode:
authorDiablosOffens <DiablosOffens@gmx.de>2015-11-11 13:57:49 +0100
committerMichael Mann <mmann78@netscape.net>2015-11-12 03:33:10 +0000
commitbf2b5780741dad53351e1cafe7eeb0afa61f37f3 (patch)
treedc537e75a53a44b4461ae70445b56eaa8e6cbb38 /config.nmake
parent09f43c196e2c642e736b77f0a0fec924be096b7d (diff)
Make it possible to set an environment variable to do debug builds.
Change-Id: I236db01194803474d63fa3d5869f7e80585bce0e Reviewed-on: https://code.wireshark.org/review/11730 Reviewed-by: Anders Broman <a.broman58@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'config.nmake')
-rw-r--r--config.nmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/config.nmake b/config.nmake
index 2ba1bc22e1..700f28023a 100644
--- a/config.nmake
+++ b/config.nmake
@@ -1025,6 +1025,12 @@ APPVER=5.02
# See http://msdn.microsoft.com/en-us/library/dn785163.aspx
# VS2015: On by default when /Zi or /Z7 used.
+!IF DEFINED(DEBUG)
+DEBUG_CFLAGS=/Od
+!ELSE
+DEBUG_CFLAGS=/O2
+!ENDIF
+
##Note: LOCAL_CFLAGS are flags used for *all* compilations
## STANDARD_CFLAGS (see below) are flags used just for *Wireshark* compilations
!IF "$(MSVC_VARIANT)" == "MSVC2005" || \
@@ -1040,7 +1046,7 @@ APPVER=5.02
"$(MSVC_VARIANT)" == "MSVC2013EE" || \
"$(MSVC_VARIANT)" == "MSVC2015" || \
"$(MSVC_VARIANT)" == "MSVC2015CE"
-LOCAL_CFLAGS=/Zi /W3 /MD /O2 /DWIN32_LEAN_AND_MEAN /DMSC_VER_REQUIRED=$(MSC_VER_REQUIRED) \
+LOCAL_CFLAGS=/Zi /W3 /MD $(DEBUG_CFLAGS) /DWIN32_LEAN_AND_MEAN /DMSC_VER_REQUIRED=$(MSC_VER_REQUIRED) \
/D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE -DPSAPI_VERSION=1
!IF "$(MSVC_VARIANT)" == "MSVC2012" || \