Browse files

Build win32 using a batch file

Batch files are independent of VC++ version, unlike project files.
  • Loading branch information...
1 parent e2e38d6 commit c02ff3f8b776968b7c79af9d19e2d1c7fb46aaa6 nnguyen committed with Nov 21, 2012
Showing with 22 additions and 0 deletions.
  1. +22 −0 src/msvcbuild.bat
@@ -0,0 +1,22 @@
+@set MYCOMPILE=cl /I"..\..\lua\src" /nologo /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_WINDLL" /D "_MBCS"
+@set MYLINK=link /INCREMENTAL:NO /nologo /NOLOGO /LIBPATH:"..\..\out"
+@set BASE_DEPENDENCIES="lua51.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib"
+@set SOCKETSRCFILES=auxiliar.c buffer.c except.c inet.c io.c luasocket.c options.c select.c tcp.c timeout.c udp.c wsocket.c
+@rem compile socket.dll
+cd src
+del /Q *.dll
+%MYLINK% /DLL %SOCKET_DEPENDENCIES% /out:socket.dll *.obj
+del /Q *.obj
+@rem compile mime.dll
+%MYCOMPILE% /D "MIME_EXPORTS" /D "MIME_API=__declspec(dllexport)" mime.c
+%MYLINK% /DLL %BASE_DEPENDENCIES% /out:mime.dll mime.obj
+del mime.obj

0 comments on commit c02ff3f

Please sign in to comment.