-
Notifications
You must be signed in to change notification settings - Fork 0
/
premake5.lua
77 lines (67 loc) · 1.53 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
workspace "BZList"
configurations {"Release"}
language "C++"
targetdir "bin"
targetprefix ""
includedirs {"../../include"}
filter "configurations:Release"
optimize "On"
newaction {
["trigger"] = "clean",
["description"] = "Delete generated project and build files",
["onStart"] =
function()
print "Cleaning files..."
end,
["execute"] =
function()
os.execute("rm -rf obj bin Makefile *.make")
end,
["onEnd"] =
function()
print "Done."
end
}
newaction {
["trigger"] = "install",
["description"] = "Install plugin",
["onStart"] =
function()
print "Copying files..."
end,
["execute"] =
function()
os.execute("chmod +x bin/BZList.so")
os.execute("cp bin/BZList.so /usr/local/lib/bzflag")
end,
["onEnd"] =
function()
print "Done."
end
}
newaction {
["trigger"] = "build",
["description"] = "Build plugin",
["onStart"] =
function()
print "Building plugin..."
end,
["execute"] =
function()
os.execute("premake5 gmake2")
os.execute("make")
end,
["onEnd"] =
function()
print "Done."
end
}
project "plugin_utils"
kind "StaticLib"
files {"../plugin_utils/*.cpp", "../plugin_utils/*.h"}
buildoptions "-fPIC"
project "BZList"
kind "SharedLib"
files {"*.cpp", "*.h", "easywsclient/easywsclient.cpp"}
includedirs {"../plugin_utils", "easywsclient"}
links {"plugin_utils"}