From 4e8c7defc3edc58a1a7550e2ab5dbc73c4d388b5 Mon Sep 17 00:00:00 2001 From: nekobit Date: Fri, 24 Mar 2023 18:55:46 +0000 Subject: [PATCH] Switch to premake slowly... FossilOrigin-Name: fbec91473a28cdf9b9d94b75b3955be56fd0fb20975a8219958fae284c523315 --- premake4.lua | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 premake4.lua diff --git a/premake4.lua b/premake4.lua new file mode 100644 index 0000000..405daa1 --- /dev/null +++ b/premake4.lua @@ -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 +} \ No newline at end of file