blob: bd36a983a09b1d536dacd93637383540a9811303 (
plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
-- the debug mode
if is_mode("debug") then
-- enable the debug symbols
set_symbols("debug")
-- disable optimization
set_optimize("none")
end
-- the release mode
if is_mode("release") then
-- set the symbols visibility: hidden
set_symbols("hidden")
-- enable fastest optimization
set_optimize("fastest")
-- strip all symbols
set_strip("all")
end
-- add target
target("add")
-- set kind
set_kind("static")
-- add files
add_files("src/add.c")
-- add target
target("sub")
-- set kind
set_kind("static")
-- add files
add_files("src/sub.c")
-- add target
target("mul")
-- set kind
set_kind("static")
-- add deps
add_deps("add", "sub")
-- add files
add_files("src/mul.c")
add_files("build/libadd.a")
add_files("build/libsub.a")
-- add link directory
add_linkdirs("$(buildir)")
|