luavs.bat 1.0 KB

12345678910111213141516171819202122232425262728
  1. @rem Script to build Lua under "Visual Studio .NET Command Prompt".
  2. @rem Do not run from this directory; run it from the toplevel: etc\luavs.bat .
  3. @rem It creates lua51.dll, lua51.lib, lua.exe, and luac.exe in src.
  4. @rem (contributed by David Manura and Mike Pall)
  5. @setlocal
  6. @set MYCOMPILE=cl /nologo /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE
  7. @set MYLINK=link /nologo
  8. @set MYMT=mt /nologo
  9. cd src
  10. %MYCOMPILE% /DLUA_BUILD_AS_DLL l*.c
  11. del lua.obj luac.obj
  12. %MYLINK% /DLL /out:lua51.dll l*.obj
  13. if exist lua51.dll.manifest^
  14. %MYMT% -manifest lua51.dll.manifest -outputresource:lua51.dll;2
  15. %MYCOMPILE% /DLUA_BUILD_AS_DLL lua.c
  16. %MYLINK% /out:lua.exe lua.obj lua51.lib
  17. if exist lua.exe.manifest^
  18. %MYMT% -manifest lua.exe.manifest -outputresource:lua.exe
  19. %MYCOMPILE% l*.c print.c
  20. del lua.obj linit.obj lbaselib.obj ldblib.obj liolib.obj lmathlib.obj^
  21. loslib.obj ltablib.obj lstrlib.obj loadlib.obj
  22. %MYLINK% /out:luac.exe *.obj
  23. if exist luac.exe.manifest^
  24. %MYMT% -manifest luac.exe.manifest -outputresource:luac.exe
  25. del *.obj *.manifest
  26. cd ..