aboutsummaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
authorJames Yonan <james@openvpn.net>2010-07-10 03:00:08 +0000
committerJames Yonan <james@openvpn.net>2010-07-10 03:00:08 +0000
commit941132efc7d6087ca9f5f18c7af274f34f0473aa (patch)
tree502cc58ec00ee3814dab350ba9a4bf129c3df0c1 /win
parentFixed issue where bad creds provided by the management interface (diff)
downloadopenvpn-941132efc7d6087ca9f5f18c7af274f34f0473aa.tar.xz
Added support for MSVC debugging of openvpn.exe in settings.in:
# Build debugging version of openvpn.exe !define PRODUCT_OPENVPN_DEBUG git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6283 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'win')
-rw-r--r--win/config.py1
-rw-r--r--win/msvc.mak.in19
-rw-r--r--win/settings.in3
3 files changed, 16 insertions, 7 deletions
diff --git a/win/config.py b/win/config.py
index 67c1d82..cf38cac 100644
--- a/win/config.py
+++ b/win/config.py
@@ -9,6 +9,7 @@ def main(config):
out_fn=home_fn('msvc.mak'),
quote_begin='@',
quote_end='@',
+ if_prefix='!',
head_comment='# %s\n\n' % autogen)
# if we are run directly, and not loaded as a module
diff --git a/win/msvc.mak.in b/win/msvc.mak.in
index 3f8102a..5d94a6e 100644
--- a/win/msvc.mak.in
+++ b/win/msvc.mak.in
@@ -23,17 +23,22 @@ LIB_DIRS = -LIBPATH:$(OPENSSL)\lib -LIBPATH:$(LZO)\lib
EXE = openvpn.exe
CPP=cl.exe
-CPP_ARG_COMMON=/nologo /W3 /O2 -DWIN32 -DWIN32_LEAN_AND_MEAN -D_CONSOLE -D_MBCS -D_CRT_SECURE_NO_DEPRECATE $(INCLUDE_DIRS) /FD /c
-# release:
-CPP_PROJ=$(CPP_ARG_COMMON) /MD -DNDEBUG
-# debug:
-#CPP_PROJ=$(CPP_ARG_COMMON) /MDd /Zi /Od -D_DEBUG
+CPP_ARG_COMMON=/nologo /W3 -DWIN32 -DWIN32_LEAN_AND_MEAN -D_CONSOLE -D_MBCS -D_CRT_SECURE_NO_DEPRECATE $(INCLUDE_DIRS) /FD /c
LINK32=link.exe
-# release:
-LINK32_FLAGS=/nologo /subsystem:console /incremental:no /out:"$(EXE)"
+
+!ifdef PRODUCT_OPENVPN_DEBUG
# debug:
+CPP_PROJ=$(CPP_ARG_COMMON) /MD /Z7
+LINK32_FLAGS=/nologo /subsystem:console /incremental:no /opt:ref /opt:icf /debug /out:"$(EXE)"
+# old debug:
+#CPP_PROJ=$(CPP_ARG_COMMON) /MDd /Zi /Od -D_DEBUG
#LINK32_FLAGS=/nologo /subsystem:console /incremental:no /debug /out:"$(EXE)"
+!else
+# release:
+CPP_PROJ=$(CPP_ARG_COMMON) /O2 /MD -DNDEBUG
+LINK32_FLAGS=/nologo /subsystem:console /incremental:no /out:"$(EXE)"
+!endif
# HEADERS and OBJS definitions, automatically generated
@HEADERS_OBJS@
diff --git a/win/settings.in b/win/settings.in
index 044834a..0e1bb1c 100644
--- a/win/settings.in
+++ b/win/settings.in
@@ -40,6 +40,9 @@
# Build debugging version of TAP driver
;!define PRODUCT_TAP_DEBUG
+# Build debugging version of openvpn.exe
+;!define PRODUCT_OPENVPN_DEBUG
+
# DDK path -- currently Windows 7 WDK
!define DDK_PATH "c:/winddk/7600.16385.1"
;!define DDK_PATH "c:/winddk/6001.18002"