Skip to content

Instantly share code, notes, and snippets.

@ousttrue
Created September 2, 2016 01:37
Show Gist options
  • Save ousttrue/3282fe33b820c41b12546d41c7edc6b2 to your computer and use it in GitHub Desktop.
Save ousttrue/3282fe33b820c41b12546d41c7edc6b2 to your computer and use it in GitHub Desktop.
local build_dir="_build_premake"
-- premake5.lua
location(build_dir)
workspace "lua"
do
configurations { "Debug", "Release" }
platforms { "Win64" }
end
filter "configurations:Debug"
do
defines { "DEBUG", "_DEBUG" }
flags { "Symbols" }
end
filter "configurations:Release"
do
defines { "NDEBUG" }
optimize "On"
end
--filter { "platforms:Win32" }
-- architecture "x32"
filter { "platforms:Win64" }
architecture "x64"
filter {"platforms:Win64", "configurations:Debug" }
targetdir(build_dir.."/Win64_Debug")
filter {"platforms:Win64", "configurations:Release" }
targetdir(build_dir.."/Win64_Release")
filter { "action:vs*" }
buildoptions {
"/wd4996",
}
defines {
"_CRT_SECURE_NO_DEPRECATE",
}
characterset ("MBCS")
filter {}
------------------------------------------------------------------------------
project "luac"
language "C"
--language "C++"
--kind "StaticLib"
--kind "SharedLib"
kind "ConsoleApp"
--kind "WindowedApp"
flags {
--"WinMain",
}
files {
"src/luac.c",
}
excludes {
}
defines {
}
includedirs {
}
buildoptions {
}
links {
"lua53",
}
------------------------------------------------------------------------------
project "lua"
language "C"
--language "C++"
--kind "StaticLib"
--kind "SharedLib"
kind "ConsoleApp"
--kind "WindowedApp"
flags {
--"WinMain",
}
files {
"src/lua.c",
}
excludes {
}
defines {
}
includedirs {
}
buildoptions {
}
links {
"lua53",
}
------------------------------------------------------------------------------
project "lua53"
language "C"
--language "C++"
kind "StaticLib"
--kind "SharedLib"
--kind "ConsoleApp"
--kind "WindowedApp"
flags {
--"WinMain",
}
files {
"src/lua.h",
-- core
"src/lapi.c",
"src/lcode.c",
"src/lctype.c",
"src/ldebug.c",
"src/ldo.c",
"src/ldump.c",
"src/lfunc.c",
"src/lgc.c",
"src/llex.c",
"src/lmem.c",
"src/lobject.c",
"src/lopcodes.c",
"src/lparser.c",
"src/lstate.c",
"src/lstring.c",
"src/ltable.c",
"src/ltm.c",
"src/lundump.c",
"src/lvm.c",
"src/lzio.c",
-- lib
"src/lauxlib.c",
"src/lbaselib.c",
"src/lbitlib.c",
"src/lcorolib.c",
"src/ldblib.c",
"src/liolib.c",
"src/lmathlib.c",
"src/loslib.c",
"src/lstrlib.c",
"src/ltablib.c",
"src/lutf8lib.c",
"src/loadlib.c",
"src/linit.c",
}
excludes {
}
defines {
--"LUA_BUILD_AS_DLL",
}
includedirs {
}
buildoptions {
}
links {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment