Skip to content

Instantly share code, notes, and snippets.

@hpcx82
Created October 28, 2012 05:30
Show Gist options
  • Save hpcx82/3967733 to your computer and use it in GitHub Desktop.
Save hpcx82/3967733 to your computer and use it in GitHub Desktop.
lua script to build lua 5.2.1
solution 'lua'
configurations {'Debug', 'Release'}
platforms {'x32', 'x64'}
if os.get() == "windows" then
defines '_CRT_SECURE_NO_WARNINGS'
end
-- the lua library
project 'lualib'
targetname 'lua' -- rename the target library to lua
kind 'StaticLib'
language 'C'
files {'lapi.c', 'lcode.c', 'ldebug.c', 'ldo.c', 'ldump.c', 'lfunc.c', 'lgc.c', 'llex.c', 'lmem.c', 'lobject.c', 'lopcodes.c', 'lparser.c', 'lstate.c', 'lstring.c', 'ltable.c', 'ltm.c', 'lundump.c', 'lvm.c', 'lzio.c', 'lauxlib.c', 'lbaselib.c', 'lbitlib.c', 'lcorolib.c', 'ldblib.c', 'liolib.c', 'lmathlib.c', 'loslib.c', 'lstrlib.c', 'ltablib.c', 'loadlib.c', 'linit.c'}
-- the lua interpret
project 'lua'
kind 'ConsoleApp'
language 'C'
links 'lualib'
if os.get() == "linux" then
links {'m'}
end
files 'lua.c'
-- the lua compiler
project 'luac'
kind 'ConsoleApp'
language 'C'
links 'lualib'
files 'luac.c'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment