diff options
author | Alberto Gonzalez Iniesta <agi@inittab.org> | 2012-02-21 15:53:40 +0100 |
---|---|---|
committer | Alberto Gonzalez Iniesta <agi@inittab.org> | 2012-02-21 15:53:40 +0100 |
commit | 349cfa7acb95abe865209a28e417ec74b56f9bba (patch) | |
tree | ad65334821b587c4ecdd461be84c94305ffdb888 /win/msvc.mak.in |
Imported Upstream version 2.2.1upstream/2.2.1
Diffstat (limited to 'win/msvc.mak.in')
-rw-r--r-- | win/msvc.mak.in | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/win/msvc.mak.in b/win/msvc.mak.in new file mode 100644 index 0000000..ac17ae9 --- /dev/null +++ b/win/msvc.mak.in @@ -0,0 +1,57 @@ +# This makefile builds the user-mode component of OpenVPN for Windows in the +# Visual Studio 2008 environment. Note that this file is basis for the real +# makefile (..\msvc.mak) but unusable as is. The real makefile is automatically +# generated during the build process by the Python build scripts. +# +# A few details are in order: +# +# - Everything between @<< and << is inserted into a s.c. "in-line file". This +# file drives the linker (link.exe). +# - HEADERS_OBJS is expanded to all all header and source files listed in +# ..\Makefile.am +# - OPENSSL_DIR and LZO_DIR are dynamically created from settings.in + +OPENSSL = @OPENSSL_DIR@ +OPENSSL_DYNAMIC = libeay32.lib ssleay32.lib + +LZO = @LZO_DIR@ +LZO_DYNAMIC = lzo2.lib + +INCLUDE_DIRS = -I$(OPENSSL)/include -I$(LZO)/include + +LIBS = $(OPENSSL_DYNAMIC) $(LZO_DYNAMIC) ws2_32.lib crypt32.lib iphlpapi.lib winmm.lib user32.lib gdi32.lib advapi32.lib wininet.lib + +LIB_DIRS = -LIBPATH:$(OPENSSL)\lib -LIBPATH:$(LZO)\lib + +EXE = openvpn.exe + +CPP=cl.exe +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 + +!ifdef PRODUCT_OPENVPN_DEBUG +# debug: +CPP_PROJ=$(CPP_ARG_COMMON) /MD /Z7 +LINK32_FLAGS=/nologo /subsystem:console /incremental:no /opt:ref /opt:icf /debug +!else +# release: +CPP_PROJ=$(CPP_ARG_COMMON) /O2 /MD -DNDEBUG +LINK32_FLAGS=/nologo /subsystem:console /incremental:no +!endif + +# HEADERS and OBJS definitions, automatically generated from ../Makefile.am +@HEADERS_OBJS@ + +openvpn : $(OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) "/out:$(EXE)" $(LIB_DIRS) $(LIBS) $(OBJS) +<< + +clean : + del /Q $(OBJS) $(EXE) *.idb *.pdb + +.c.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< |