Switch to premake slowly...

FossilOrigin-Name: fbec91473a28cdf9b9d94b75b3955be56fd0fb20975a8219958fae284c523315
This commit is contained in:
nekobit 2023-03-24 18:55:46 +00:00
parent e4f23744a7
commit 4e8c7defc3
1 changed files with 34 additions and 0 deletions

34
premake4.lua Normal file
View File

@ -0,0 +1,34 @@
solution "Treebird"
configurations { "Debug", "Release" };
-- BEGIN Mastodont project
project("treebird");
kind("ConsoleApp");
language("C");
cdialect("C99");
files { "src/*.h", "src/*.c" };
includedirs { "include/" };
configuration { "linux", "bsd", "gmake" };
linkoptions { "`pkg-config --libs mastodont`" };
configuration { "Debug" };
defines { "DEBUG" };
flags("Symbols");
configuration { "Release" };
defines { "NDEBUG" };
flags("Optimize");
-- END Mastodont-c
local prefix = os.getenv("PREFIX") or "/usr/local";
newaction {
trigger = "install",
description = "install binary",
execute = function()
os.copyfile("treebird", prefix .. "/bin");
os.mkdir(prefix .. "/share/treebird");
os.execute("install -d dist/ " .. prefix .. "/share/treebird");
end
}