-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpremake5.lua
102 lines (80 loc) · 2.07 KB
/
premake5.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
-- A solution contains projects, and defines the available configurations
solution ("practice")
configurations {"Release","Debug"}
location "build"
targetdir "build/bin"
-- A project defines one build target
p1 = project("hello1")
basedir(p1.name)
location("build/" .. p1.name)
kind "ConsoleApp"
language "c"
files { p1.name .. "/*.h", p1.name .. "/*.c", "common/*.h", "common/*.c" }
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
-- A project defines one build target
p2 = project("hello2")
basedir(p2.name)
location("build/" .. p2.name)
kind "ConsoleApp"
language "c"
files { p2.name .. "/*.h", p2.name .. "/*.c", "common/*.h", "common/*.c" }
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
p3 = project("openat")
basedir(p3.name)
location("build/" .. p3.name)
kind "ConsoleApp"
language "c"
files { p3.name .. "/*.h", p3.name .. "/*.c", "common/*.h", "common/*.c" }
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
p4 = project("dup2")
basedir(p4.name)
location("build/" .. p4.name)
kind "ConsoleApp"
language "c"
files { p4.name .. "/*.h", p4.name .. "/*.c", "common/*.h", "common/*.c" }
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
p5 = project("uid")
basedir(p5.name)
location("build/" .. p5.name)
kind "ConsoleApp"
language "c"
files { p5.name .. "/*.h", p5.name .. "/*.c", "common/*.h", "common/*.c" }
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
p6 = project("game")
basedir(p6.name)
location("build/" .. p6.name)
kind "ConsoleApp"
language "c"
links { "curses" }
files { p6.name .. "/*.h", p6.name .. "/*.c", "common/*.h", "common/*.c" }
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"