Created
August 14, 2022 18:36
-
-
Save athanggupte/8fe1adabe8afd12129a5f88a3443eea8 to your computer and use it in GitHub Desktop.
Premake script to generate Lua lang project files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
target_dir = "%{wks.location}/bin" | |
obj_dir = "%{wks.location}/obj" | |
lualib_files = { | |
"lapi.c", "lapi.h", | |
"lcode.c", "lcode.h", | |
"lctype.c", "lctype.h", | |
"ldebug.c", "ldebug.h", | |
"ldo.c", "ldo.h", | |
"ldump.c", | |
"lfunc.c", "lfunc.h", | |
"lgc.c", "lgc.h", | |
"llex.c", "llex.h", | |
"lmem.c", "lmem.h", | |
"lobject.c", "lobject.h", | |
"lopcodes.c", "lopcodes.h", | |
"lparser.c", "lparser.h", | |
"lstate.c", "lstate.h", | |
"lstring.c", "lstring.h", | |
"ltable.c", "ltable.h", | |
"ltm.c", "ltm.h", | |
"lundump.c", "lundump.h", | |
"lvm.c", "lvm.h", | |
"lzio.c", "lzio.h", | |
"lauxlib.c", "lauxlib.h", | |
"lbaselib.c", | |
"lcorolib.c", | |
"ldblib.c", | |
"liolib.c", | |
"lmathlib.c", | |
"loadlib.c", | |
"loslib.c", | |
"lstrlib.c", | |
"ltablib.c", | |
"lutf8lib.c", | |
"linit.c" | |
} | |
project "library" | |
kind "SharedLib" | |
language "C" | |
staticruntime "Off" | |
targetdir(target_dir) | |
objdir(obj_dir) | |
files(lualib_files) | |
implibname "lualib" | |
defines { | |
"LUA_BUILD_AS_DLL" | |
} | |
project "library-static" | |
kind "StaticLib" | |
language "C" | |
staticruntime "Off" | |
targetdir(target_dir) | |
objdir(obj_dir) | |
files(lualib_files) | |
project "compiler" | |
kind "ConsoleApp" | |
language "C" | |
staticruntime "Off" | |
targetname "luac" | |
targetdir(target_dir) | |
objdir(obj_dir) | |
files { | |
"luac.c" | |
} | |
links { | |
"library-static" | |
} | |
project "interpreter" | |
kind "ConsoleApp" | |
language "C" | |
staticruntime "Off" | |
targetname "lua" | |
targetdir(target_dir) | |
objdir(obj_dir) | |
files { | |
"lua.c", "lua.h" | |
} | |
links { | |
"library" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment