forked from pbghogehoge/ssg
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathTupfile.linux.lua
31 lines (25 loc) · 1.1 KB
/
Tupfile.linux.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
tup.include("libs/tupblocks/toolchain.clang.lua")
tup.include("libs/BLAKE3.lua")
local PLATFORM_LINK = EnvConfig("sdl2", "pangocairo", "fontconfig")
local XIPH_LINK = EnvConfig("ogg", "vorbis", "vorbisfile")
local BLAKE3_LINK = (EnvConfig("libblake3") or BuildBLAKE3(CONFIG, 0))
-- Since Pango/Cairo adds -pthread to a later configuration, the C++ standard
-- library must also be compiled with this flag.
CONFIG = CONFIG:branch({ cflags = "-pthread" })
local ssg_cfg = CONFIG:branch(
BLAKE3_LINK, XIPH_LINK, SSG_COMPILE, cxx_std_modules(CONFIG), {
cflags = { "-DLINUX" },
}
)
local ssg_obj = cxx(ssg_cfg, SSG_SRC)
-- Our platform layer code
LAYERS_SRC += (SSG.glob("platform/c/*.cpp"))
ssg_obj = (ssg_obj + cxx(ssg_cfg, LAYERS_SRC))
local platform_cfg = ssg_cfg:branch(PLATFORM_LINK)
local platform_src = SSG.glob("platform/sdl/*.cpp")
platform_src += SSG.glob("platform/miniaudio/*.cpp")
platform_src += SSG.glob("platform/pangocairo/*.cpp")
platform_src += "MAIN/main_sdl.cpp"
platform_src.extra_inputs += PLATFORM_CONSTANTS
ssg_obj = (ssg_obj + cxx(platform_cfg, platform_src))
exe(platform_cfg, ssg_obj, "GIAN07")