diff options
Diffstat (limited to 'libnet/msvcbuild.bat')
-rw-r--r-- | libnet/msvcbuild.bat | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libnet/msvcbuild.bat b/libnet/msvcbuild.bat new file mode 100644 index 0000000..e2d62df --- /dev/null +++ b/libnet/msvcbuild.bat @@ -0,0 +1,22 @@ +@rem Script to build libnet under "Visual Studio .NET Command Prompt".
+@rem Dependencies are:
+@rem winpcap, specifically, the winpcap developer pack
+
+@setlocal
+@set MYCOMPILE=cl /nologo /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE
+@set MYLINK=link /nologo
+@set MYMT=mt /nologo
+
+@rem relative to C code in src/
+@set WINPCAP=..\..\..\WpdPack
+
+copy include\win32\libnet.h include\
+copy include\win32\stdint.h include\libnet\
+
+cd src
+%MYCOMPILE% /I..\include /I%WINPCAP%\Include libnet_a*.c libnet_build_*.c libnet_c*.c libnet_dll.c libnet_error.c libnet_i*.c libnet_link_win32.c libnet_p*.c libnet_raw.c libnet_resolve.c libnet_version.c libnet_write.c
+%MYLINK% /DLL /libpath:%WINPCAP%\Lib /out:libnet.dll *.obj Advapi32.lib
+if exist libnet.dll.manifest^
+ %MYMT% -manifest libnet.dll.manifest -outputresource:libnet.dll;2
+cd ..
+
|