1@rem Script to build Lua BitOp with MSVC. 2 3@rem First change the paths to your Lua installation below. 4@rem Then open a "Visual Studio .NET Command Prompt", cd to this directory 5@rem and run this script. Afterwards copy the resulting bit.dll to 6@rem the directory where lua.exe is installed. 7 8@if not defined INCLUDE goto :FAIL 9 10@setlocal 11@rem Path to the Lua includes and the library file for the Lua DLL: 12@set LUA_INC=-I .. 13@set LUA_LIB=..\lua51.lib 14 15@set MYCOMPILE=cl /nologo /MD /O2 /W3 /c %LUA_INC% 16@set MYLINK=link /nologo 17@set MYMT=mt /nologo 18 19%MYCOMPILE% bit.c 20%MYLINK% /DLL /export:luaopen_bit /out:bit.dll bit.obj %LUA_LIB% 21if exist bit.dll.manifest^ 22 %MYMT% -manifest bit.dll.manifest -outputresource:bit.dll;2 23 24del *.obj *.exp *.manifest 25 26@goto :END 27:FAIL 28@echo You must open a "Visual Studio .NET Command Prompt" to run this script 29:END 30