Skip to content

Instantly share code, notes, and snippets.

@donalmacc
Created April 10, 2014 14:24
Show Gist options
  • Save donalmacc/10387929 to your computer and use it in GitHub Desktop.
Save donalmacc/10387929 to your computer and use it in GitHub Desktop.
Premake4 script to generate a solution for Lua 5.2.3 from the source found on 10/04/2014.
solution "Lua"
configurations { "Release", "Debug"}
os.chdir("src")
-- The static Lua library
project "Lua51"
bindir = "bin"
libdir = "lib"
kind "StaticLib"
language "C"
files {"lapi.c", "lcode.c", "lctype.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" }
configuration "Release"
defines { "NDEBUG" }
flags { "Optimize" }
configuration "Debug"
defines { "DEBUG" }
flags { "Symbols" }
-- Interpreter
project "Lua.exe"
bindir = "bin"
libdir = "lib"
kind "ConsoleApp"
language "C"
files {"lua.c"}
configuration "Release"
defines { "NDEBUG" }
flags { "Optimize" }
links { "Lua51" }
configuration "Debug"
defines { "DEBUG" }
flags { "Symbols" }
links { "Lua51" }
-- Compiler
project "LuaC.exe"
bindir = "bin"
libdir = "lib"
kind "ConsoleApp"
language "C"
files {"luac.c"}
configuration "Release"
defines { "NDEBUG" }
flags { "Optimize" }
links { "Lua51" }
configuration "Debug"
defines { "DEBUG" }
flags { "Symbols" }
links { "Lua51" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment