From c068f22329d5cc722622a2183bbb22eef2093df7 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 24 Aug 2026 11:16:07 +0200 Subject: initial import --- platforms/premake/premake4.lua | 101 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 platforms/premake/premake4.lua (limited to 'platforms/premake/premake4.lua') diff --git a/platforms/premake/premake4.lua b/platforms/premake/premake4.lua new file mode 100644 index 0000000..4e58f21 --- /dev/null +++ b/platforms/premake/premake4.lua @@ -0,0 +1,101 @@ +--[[ + usage example: + premake4 gmake && make config=release server + + only works with Linux for now +]] + + +local paths = { + --root = path.getabsolute("../../"), -- root openparsec folder + --premakefolder = path.getabsolute(""), + root = "../../", + premakefolder = "./" +} + +paths.parsecroot = path.join(paths.root, "parsec_root") + + +local srcpaths = { + libraries = "../../src/libraries", + libparsec = "../../src/libparsec", + parsec = "../../src/parsec", + parsecserver = "../../src/parsec_server", +} + + +solution "ParsecSolution" + language "C++" + platforms { "x32" } + includedirs { srcpaths.libraries } + + configurations { "Debug", "Release" } + + configuration "Debug" + defines { "DEBUG" } + flags "Symbols" + + configuration "Release" + flags "Optimize" + + configuration "linux" + includedirs { "/usr/include", "/usr/local/include", "/opt/include" } + + +project "client" + kind "WindowedApp" + location "build/client" + targetdir "build/client" + targetname "Parsec" + + defines { "PARSEC_CLIENT" } + + includedirs { + srcpaths.libparsec.."/include", + srcpaths.parsec.."/include", + } + + files { + srcpaths.libraries.."/**", + srcpaths.libparsec.."/**", + srcpaths.parsec.."/**", + } + + configuration "not windows" + -- These are apparently windows thingies + excludes { srcpaths.parsec.."/**.rc" } + + configuration "linux" + targetname "parsec" + links { "SDL", "SDL_mixer", "GL" } + postbuildcommands { + --("cp parsec %q"):format(paths.parsecroot.."/client/"), + "cp parsec ../../../../parsec_root/client/" + } + + +project "server" + kind "ConsoleApp" + location "build/server" + targetdir "build/server" + targetname "parsec_server" + + defines { "PARSEC_SERVER" } + + includedirs { + srcpaths.libparsec.."/include", + srcpaths.parsecserver.."/include", + } + + files { + srcpaths.libparsec.."/**", + srcpaths.parsecserver.."/**", + } + + configuration "linux" + links { "ncurses" } + postbuildcommands { + --("cp parsec_server %q"):format(paths.parsecroot.."/server/"), + "cp parsec_server ../../../../parsec_root/server/" + } + -- cgit v1.2.3