aboutsummaryrefslogtreecommitdiff
path: root/makefile.w32
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-09-26 05:28:27 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-09-26 05:28:27 +0000
commit6fbf66fad3367b24fd6743bcd50254902fd9c8d5 (patch)
tree9802876e3771744eead18917bb47ff6e90ac39f5 /makefile.w32
downloadopenvpn-6fbf66fad3367b24fd6743bcd50254902fd9c8d5.tar.xz
This is the start of the BETA21 branch.
It includes the --topology feature, and TAP-Win32 driver changes to allow non-admin access. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@580 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to '')
-rwxr-xr-xmakefile.w32197
-rw-r--r--makefile.w32-vc179
2 files changed, 376 insertions, 0 deletions
diff --git a/makefile.w32 b/makefile.w32
new file mode 100755
index 0000000..6ce111f
--- /dev/null
+++ b/makefile.w32
@@ -0,0 +1,197 @@
+# This Makefile builds the user-mode component
+# of OpenVPN for WIN32 in the MinGW environment.
+#
+# Build Dependencies:
+# mingw (GNU C compiler for windows)
+# msys (GNU utilities and shell for windows)
+# OpenSSL (SSL/TLS/crypto library)
+# LZO (real-time compression library)
+# Dmalloc (debugging only)
+#
+# Targets:
+# static -- link statically with OpenSSL
+# dynamic -- link dynamically with OpenSSL
+# dmalloc -- enable memory debugging using the dmalloc library
+#
+# Note that LZO is always linked statically.
+#
+# To build openssl-0.9.7d, remember to edit ms\mw.bat
+# adding '--win32' flag to make command:
+#
+# make --win32 -f ms/mingw32.mak
+#
+# Now cd to top level openssl directory in a Windows
+# command-prompt window, and type:
+#
+# ms\mw
+#
+# See additional .bat scripts in install-win32 for OpenSSL
+# build setup.
+#
+# If you are building with dmalloc debugging support
+# see windbg.h for additional dmalloc notes.
+
+#########################################################
+# Change these to point to your OpenSSL, LZO, and
+# (optionally) dmalloc top-level directories.
+
+OPENSSL = /c/src/openssl-0.9.7g
+LZO = /c/src/lzo-1.08
+DMALLOC = /c/src/dmalloc-5.4.2
+
+#########################################################
+
+CC = gcc -g -O2 -Wall -Wno-unused-function -Wno-unused-variable -mno-cygwin
+
+CC_DMALLOC = gcc -g -O2 -Wall -Wno-unused-function -Wno-unused-variable -mno-cygwin -fno-inline -DDMALLOC
+
+INCLUDE_DIRS = -I${OPENSSL}/include -I${LZO}/include
+
+INCLUDE_DIRS_DMALLOC = ${INCLUDE_DIRS} -I${DMALLOC}
+
+LIBS = -llzo -lcrypt32 -lws2_32 -lgdi32 -liphlpapi -lwinmm
+
+LIBS_DMALLOC = ${LIBS} -ldmalloc
+
+LIB_DIRS = -L${OPENSSL}/out -L${LZO}
+
+LIB_DIRS_DMALLOC = ${LIB_DIRS} -L${DMALLOC}
+
+EXE = openvpn.exe
+
+HEADERS = \
+ base64.h \
+ basic.h \
+ buffer.h \
+ circ_list.h \
+ common.h \
+ tap-win32/common.h \
+ config-win32.h \
+ crypto.h \
+ cryptoapi.h \
+ errlevel.h \
+ error.h \
+ event.h \
+ fdmisc.h \
+ forward-inline.h \
+ forward.h \
+ fragment.h \
+ gremlin.h \
+ helper.h \
+ init.h \
+ integer.h \
+ interval.h \
+ list.h \
+ lzo.h \
+ manage.h \
+ mbuf.h \
+ memdbg.h \
+ misc.h \
+ mroute.h \
+ mss.h \
+ mtcp.h \
+ mtu.h \
+ mudp.h \
+ multi.h \
+ ntlm.h \
+ occ-inline.h \
+ occ.h \
+ openvpn.h \
+ openvpn-plugin.h \
+ options.h \
+ otime.h \
+ packet_id.h \
+ perf.h \
+ ping-inline.h \
+ ping.h \
+ plugin.h \
+ pool.h \
+ proto.h \
+ proxy.h \
+ push.h \
+ reliable.h \
+ route.h \
+ schedule.h \
+ session_id.h \
+ shaper.h \
+ sig.h \
+ socket.h \
+ socks.h \
+ ssl.h \
+ status.h \
+ syshead.h \
+ thread.h \
+ tun.h \
+ win32.h
+
+OBJS = base64.o \
+ buffer.o \
+ crypto.o \
+ cryptoapi.o \
+ error.o \
+ event.o \
+ fdmisc.o \
+ forward.o \
+ fragment.o \
+ gremlin.o \
+ helper.o \
+ init.o \
+ interval.o \
+ list.o \
+ lzo.o \
+ manage.o \
+ mbuf.o \
+ misc.o \
+ mroute.o \
+ mss.o \
+ mtcp.o \
+ mtu.o \
+ mudp.o \
+ multi.o \
+ ntlm.o \
+ occ.o \
+ openvpn.o \
+ options.o \
+ otime.o \
+ packet_id.o \
+ perf.o \
+ ping.o \
+ plugin.o \
+ pool.o \
+ proto.o \
+ proxy.o \
+ push.o \
+ reliable.o \
+ route.o \
+ schedule.o \
+ session_id.o \
+ shaper.o \
+ sig.o \
+ socket.o \
+ socks.o \
+ ssl.o \
+ status.o \
+ thread.o \
+ tun.o \
+ win32.o
+
+dynamic : MY_CC = ${CC}
+dynamic : MY_INCLUDE_DIRS = ${INCLUDE_DIRS}
+dynamic : ${OBJS}
+ ${MY_CC} -o ${EXE} ${OBJS} ${LIB_DIRS} -lssl32 -leay32 ${LIBS}
+
+static : MY_CC = ${CC}
+static : MY_INCLUDE_DIRS = ${INCLUDE_DIRS}
+static : ${OBJS}
+ ${CC} -o ${EXE} ${OBJS} ${LIB_DIRS} -lssl -lcrypto ${LIBS}
+
+dmalloc : MY_CC = ${CC_DMALLOC}
+dmalloc : MY_INCLUDE_DIRS = ${INCLUDE_DIRS_DMALLOC}
+dmalloc : ${OBJS}
+ ${MY_CC} -o ${EXE} ${OBJS} ${LIB_DIRS_DMALLOC} -lssl32 -leay32 ${LIBS_DMALLOC}
+
+clean :
+ rm -f ${OBJS} ${EXE}
+
+%.o : %.c ${HEADERS}
+ ${MY_CC} ${MY_INCLUDE_DIRS} -c $< -o $@
diff --git a/makefile.w32-vc b/makefile.w32-vc
new file mode 100644
index 0000000..e37c8c8
--- /dev/null
+++ b/makefile.w32-vc
@@ -0,0 +1,179 @@
+# This makefile builds the user-mode component
+# of OpenVPN for WIN32 in the MSVC++ environment.
+#
+# Build Dependencies:
+# OpenSSL (SSL/TLS/crypto library)
+# LZO (real-time compression library)
+#
+# Targets:
+# static -- link statically with OpenSSL
+# dynamic -- link dynamically with OpenSSL
+#
+# Note that LZO is always linked statically.
+
+# Change these to point to your OpenSSL and LZO top-level
+# directories.
+
+OPENSSL = \src\openssl-0.9.7d
+OPENSSL_STATIC = libeay32s.lib ssleay32s.lib
+#OPENSSL_STATIC = libeay32sd.lib ssleay32sd.lib
+OPENSSL_DYNAMIC = libeay32.lib ssleay32.lib
+#OPENSSL_DYNAMIC = libeay32d.lib ssleay32d.lib
+
+LZO = \src\lzo-1.08.vc
+
+INCLUDE_DIRS = -I$(OPENSSL)/include -I$(LZO)/include
+
+LIBS = lzo.lib ws2_32.lib crypt32.lib iphlpapi.lib winmm.lib gdi32.lib advapi32.lib
+
+LIB_DIRS = -LIBPATH:$(OPENSSL)\out -LIBPATH:$(LZO)
+
+EXE = openvpn.exe
+
+CPP=cl.exe
+# release:
+CPP_PROJ=/nologo /MD /W3 /G5 /O2 -DNDEBUG -DWIN32 -DWIN32_LEAN_AND_MEAN -D_CONSOLE -D_MBCS $(INCLUDE_DIRS) /FD /c
+# debug:
+#CPP_PROJ=/nologo /MDd /W3 /G5 /Zi /Od -D_DEBUG -DWIN32 -DWIN32_LEAN_AND_MEAN -D_CONSOLE -D_MBCS $(INCLUDE_DIRS) /FD /c
+
+LINK32=link.exe
+# release:
+LINK32_FLAGS=/nologo /subsystem:console /incremental:no /out:"$(EXE)"
+# debug:
+#LINK32_FLAGS=/nologo /subsystem:console /incremental:no /debug /out:"$(EXE)"
+
+# Make sure the HEADERS and OBJS definitions below match the same
+# definitions in makefile.w32.
+
+HEADERS = \
+ base64.h \
+ basic.h \
+ buffer.h \
+ circ_list.h common.h \
+ tap-win32/common.h \
+ config-win32.h \
+ crypto.h \
+ cryptoapi.h \
+ errlevel.h \
+ error.h \
+ event.h \
+ fdmisc.h \
+ forward-inline.h \
+ forward.h \
+ fragment.h \
+ gremlin.h \
+ helper.h \
+ init.h \
+ integer.h \
+ interval.h \
+ list.h \
+ lzo.h \
+ manage.h \
+ mbuf.h \
+ memdbg.h \
+ misc.h \
+ mroute.h \
+ mss.h \
+ mtcp.h \
+ mtu.h \
+ mudp.h \
+ multi.h \
+ ntlm.h \
+ occ-inline.h \
+ occ.h \
+ openvpn.h \
+ openvpn-plugin.h \
+ options.h \
+ otime.h \
+ packet_id.h \
+ perf.h \
+ ping-inline.h \
+ ping.h \
+ plugin.h \
+ pool.h \
+ proto.h \
+ proxy.h \
+ push.h \
+ reliable.h \
+ route.h \
+ schedule.h \
+ session_id.h \
+ shaper.h \
+ sig.h \
+ socket.h \
+ socks.h \
+ ssl.h \
+ status.h \
+ syshead.h \
+ thread.h \
+ tun.h \
+ win32.h
+
+OBJS = base64.obj \
+ buffer.obj \
+ crypto.obj \
+ cryptoapi.obj \
+ error.obj \
+ event.obj \
+ fdmisc.obj \
+ forward.obj \
+ fragment.obj \
+ gremlin.obj \
+ helper.obj \
+ init.obj \
+ interval.obj \
+ list.obj \
+ lzo.obj \
+ manage.obj \
+ mbuf.obj \
+ misc.obj \
+ mroute.obj \
+ mss.obj \
+ mtcp.obj \
+ mtu.obj \
+ mudp.obj \
+ multi.obj \
+ ntlm.obj \
+ occ.obj \
+ openvpn.obj \
+ options.obj \
+ otime.obj \
+ packet_id.obj \
+ perf.obj \
+ ping.obj \
+ plugin.obj \
+ pool.obj \
+ proto.obj \
+ proxy.obj \
+ push.obj \
+ reliable.obj \
+ route.obj \
+ schedule.obj \
+ session_id.obj \
+ shaper.obj \
+ sig.obj \
+ socket.obj \
+ socks.obj \
+ ssl.obj \
+ status.obj \
+ thread.obj \
+ tun.obj \
+ win32.obj
+
+dynamic : $(OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LIB_DIRS) $(LIBS) $(OPENSSL_DYNAMIC) $(OBJS)
+<<
+
+static : $(OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LIB_DIRS) $(LIBS) $(OPENSSL_STATIC) $(OBJS)
+<<
+
+clean :
+ del /Q $(OBJS) $(EXE) *.idb *.pdb
+
+.c.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<