-
Notifications
You must be signed in to change notification settings - Fork 9
/
premake5_arm.lua
131 lines (110 loc) · 2.4 KB
/
premake5_arm.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
-- A solution
workspace "focas_ubus"
configurations { "Debug", "Release"}
project "focas_ubus"
kind "ConsoleApp"
language "C++"
location "build/focas_ubus"
targetdir "bin/%{cfg.buildcfg}"
dependson { "libjson-c-static", "libubox-static", "libubus-static" }
includedirs {
".",
"./src",
"./deps",
"./deps/ubus",
"./focas"
}
files {
"./src/main.c"
}
libdirs {
--"./focas/x86"
"./focas/arm/"
}
links { "libubus-static", "libubox-static", "libjson-c-static", "fwlib32", "pthread", "rt"}
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
project "libubus-static"
kind "StaticLib"
language "C"
location "build/libubox"
targetprefix ""
targetdir "bin/%{cfg.buildcfg}"
dependson { "libjson-c-static", "libubux-static" }
defines {
"UBUS_MAX_MSGLEN=1048576",
'UBUS_UNIX_SOCKET="/var/run/ubus/ubus.sock"'
}
includedirs {
".",
"./deps/libubox/",
"./deps/",
}
files {
"./deps/ubus/libubus*.h",
"./deps/ubus/libubus*.c",
}
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
project "libubox-static"
kind "StaticLib"
language "C"
location "build/libubox"
targetprefix ""
targetdir "bin/%{cfg.buildcfg}"
dependson { "libjson-c-static" }
includedirs {
".",
"./deps/",
}
files {
"./deps/libubox/avl.c",
"./deps/libubox/avl-cmp.c",
"./deps/libubox/blob.c",
"./deps/libubox/blobmsg.c",
"./deps/libubox/uloop.c",
"./deps/libubox/usock.c",
"./deps/libubox/ustream.c",
"./deps/libubox/ustream-fd.c",
"./deps/libubox/vlist.c",
"./deps/libubox/utils.c",
"./deps/libubox/safe_list.c",
"./deps/libubox/runqueue.c",
"./deps/libubox/md5.c",
"./deps/libubox/kvlist.c",
"./deps/libubox/ulog.c",
"./deps/libubox/base64.c",
}
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
project "libjson-c-static"
kind "StaticLib"
language "C"
location "build/json-c"
targetdir "bin/%{cfg.buildcfg}"
includedirs {
".",
}
files {
"./deps/json-c/*.h",
"./deps/json-c/*.c",
}
--buildoptions { '-Wpedantic', '-pedantic', '-pedantic-errors', "-fPIC" }
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"