-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathxmake.lua
40 lines (30 loc) · 957 Bytes
/
xmake.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
32
33
34
35
36
set_xmakever("2.8.9")
set_version("0.1.0", {build = "%Y%m%d%H%M"})
set_allowedmodes("debug", "release")
set_defaultmode("debug")
add_rules("mode.debug", "mode.release")
toolchain("dwtc") -- recommended toolchain
set_kind("standalone")
set_toolset("cc", "clang")
set_toolset("cxx", "clang++", "clang")
set_toolset("ld", "clang", {force = true}) -- ensure mold is used as linker
set_toolset("sh", "clang++", "clang")
set_toolset("ar", "llvm-ar")
toolchain_end()
target("duckwave")
set_kind("binary")
add_includedirs("include")
add_files("src/main.c", "src/duckwave.c","src/animation.c")
if is_mode("release") then
set_optimize("fastest")
set_symbols("hidden")
elseif is_mode("debug") then
set_optimize("none")
set_symbols("debug")
end
set_targetdir("bin")
set_languages("c17")
add_ldflags("-fuse-ld=mold", {force = true}) -- add mold linker flag
-- add_links("avformat", "avcodec", "ao", "m")
add_links("ncursesw", "m")
target_end()