-
Notifications
You must be signed in to change notification settings - Fork 0
/
premake5.lua
88 lines (72 loc) · 1.56 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
require 'configure'
require 'ios'
workspace "LogDB"
configurations { "Debug", "DebugVerbose", "Release" }
filter "configurations:Debug*"
defines { "DEBUG" }
symbols "On"
targetdir "bin/Debug"
filter "configurations:DebugVerbose"
defines { "VERBOSE" }
filter "configurations:Release"
optimize "Speed"
targetdir "bin/Release"
project "LogDB"
language "C"
files {
"include/**.h",
"src/**.h",
"src/**.c"
}
includedirs { "include" }
filter "system:not ios"
kind "SharedLib"
filter "system:macosx"
linkoptions { '-Wl,-install_name', '-Wl,@loader_path/%{cfg.linktarget.name}' }
project "Tests"
language "C"
kind "ConsoleApp"
files {
"tests/**.h",
"tests/**.def",
"tests/**.c"
}
links { "LogDB" }
includedirs { "include" }
project "StressTest"
language "C"
kind "ConsoleApp"
files {
"stress/stress.c"
}
links { "LogDB" }
includedirs { "include" }
project "StressTestDump"
language "C"
kind "ConsoleApp"
files {
"stress/dump.c"
}
links { "LogDB" }
includedirs { "include" }
newaction {
trigger = "clean",
description = "Remove all binaries and generated files",
execute = function()
os.rmdir("bin")
os.rmdir("obj")
os.rmdir("DerivedData")
os.rmdir(path.join("bindings", "C#", "bin"))
os.rmdir(path.join("bindings", "C#", "obj"))
for i, dir in ipairs(os.matchdirs("*.xc*")) do
os.rmdir(dir)
end
os.remove("Makefile")
for i, file in ipairs(os.matchfiles("*.make")) do
os.remove(file)
end
for i, file in ipairs(os.matchfiles(path.join("bindings", "C#", "*.nupkg"))) do
os.remove(file)
end
end
}