]>
Commit | Line | Data |
---|---|---|
3a726fcd | 1 | # SPDX-License-Identifier: LGPL-2.1+ |
3a726fcd | 2 | |
2d4ceca8 | 3 | basic_sources = files(''' |
71e5200f DM |
4 | MurmurHash2.c |
5 | MurmurHash2.h | |
37efbbd8 ZJS |
6 | af-list.c |
7 | af-list.h | |
8 | alloc-util.c | |
9 | alloc-util.h | |
10 | architecture.c | |
11 | architecture.h | |
12 | arphrd-list.c | |
13 | arphrd-list.h | |
14 | async.c | |
15 | async.h | |
16 | audit-util.c | |
17 | audit-util.h | |
18c528e9 LP |
18 | blockdev-util.c |
19 | blockdev-util.h | |
37efbbd8 ZJS |
20 | btrfs-util.c |
21 | btrfs-util.h | |
22 | build.h | |
23 | bus-label.c | |
24 | bus-label.h | |
37efbbd8 ZJS |
25 | cap-list.c |
26 | cap-list.h | |
71e5200f DM |
27 | capability-util.c |
28 | capability-util.h | |
37efbbd8 ZJS |
29 | cgroup-util.c |
30 | cgroup-util.h | |
31 | chattr-util.c | |
32 | chattr-util.h | |
37efbbd8 ZJS |
33 | conf-files.c |
34 | conf-files.h | |
35 | copy.c | |
36 | copy.h | |
37efbbd8 ZJS |
37 | def.h |
38 | device-nodes.c | |
39 | device-nodes.h | |
40 | dirent-util.c | |
41 | dirent-util.h | |
686d13b9 LP |
42 | env-file.c |
43 | env-file.h | |
37efbbd8 ZJS |
44 | env-util.c |
45 | env-util.h | |
46 | errno-list.c | |
47 | errno-list.h | |
2b2fec7d | 48 | errno-util.h |
37efbbd8 ZJS |
49 | escape.c |
50 | escape.h | |
51 | ether-addr-util.c | |
52 | ether-addr-util.h | |
37efbbd8 ZJS |
53 | extract-word.c |
54 | extract-word.h | |
55 | fd-util.c | |
56 | fd-util.h | |
71e5200f DM |
57 | fileio.c |
58 | fileio.h | |
37efbbd8 ZJS |
59 | format-util.h |
60 | fs-util.c | |
61 | fs-util.h | |
62 | glob-util.c | |
63 | glob-util.h | |
64 | gunicode.c | |
65 | gunicode.h | |
66 | hash-funcs.c | |
67 | hash-funcs.h | |
68 | hashmap.c | |
69 | hashmap.h | |
70 | hexdecoct.c | |
71 | hexdecoct.h | |
72 | hostname-util.c | |
73 | hostname-util.h | |
74 | in-addr-util.c | |
75 | in-addr-util.h | |
37efbbd8 ZJS |
76 | io-util.c |
77 | io-util.h | |
71e5200f | 78 | ioprio.h |
f05e1d0d LP |
79 | kbd-util.c |
80 | kbd-util.h | |
37efbbd8 ZJS |
81 | khash.c |
82 | khash.h | |
83 | label.c | |
84 | label.h | |
eefc66aa LP |
85 | limits-util.c |
86 | limits-util.h | |
01234e1f YW |
87 | linux/btrfs.h |
88 | linux/btrfs_tree.h | |
89 | linux/can/vxcan.h | |
90 | linux/fib_rules.h | |
91 | linux/fou.h | |
92 | linux/if.h | |
93 | linux/if_addr.h | |
94 | linux/if_arp.h | |
95 | linux/if_bonding.h | |
96 | linux/if_bridge.h | |
97 | linux/if_link.h | |
45cae4ab | 98 | linux/if_macsec.h |
01234e1f YW |
99 | linux/if_tun.h |
100 | linux/if_tunnel.h | |
101 | linux/libc-compat.h | |
102 | linux/netlink.h | |
103 | linux/rtnetlink.h | |
104 | linux/wireguard.h | |
37efbbd8 ZJS |
105 | list.h |
106 | locale-util.c | |
107 | locale-util.h | |
37efbbd8 ZJS |
108 | log.c |
109 | log.h | |
110 | login-util.c | |
111 | login-util.h | |
112 | macro.h | |
113 | memfd-util.c | |
114 | memfd-util.h | |
0a970718 LP |
115 | memory-util.c |
116 | memory-util.h | |
37efbbd8 ZJS |
117 | mempool.c |
118 | mempool.h | |
18bf324a | 119 | missing.h |
0e7117d0 | 120 | missing_audit.h |
8ca2702f | 121 | missing_capability.h |
5b139f86 | 122 | missing_drm.h |
dea72eda | 123 | missing_fcntl.h |
503f480f | 124 | missing_fs.h |
31c2ddab | 125 | missing_input.h |
d7276b61 | 126 | missing_keyctl.h |
1e54f0ab | 127 | missing_magic.h |
c8a363eb | 128 | missing_mman.h |
475c18f0 | 129 | missing_network.h |
2a03bb3e | 130 | missing_prctl.h |
b19bb111 | 131 | missing_random.h |
6c76de27 | 132 | missing_resource.h |
22332e33 | 133 | missing_sched.h |
3843e826 | 134 | missing_securebits.h |
66ffbdf9 | 135 | missing_socket.h |
e01819f8 | 136 | missing_stat.h |
470f348b | 137 | missing_stdlib.h |
37efbbd8 | 138 | missing_syscall.h |
d7330b60 | 139 | missing_timerfd.h |
38e0c63d | 140 | missing_type.h |
71e5200f | 141 | mkdir-label.c |
37efbbd8 ZJS |
142 | mkdir.c |
143 | mkdir.h | |
049af8ad ZJS |
144 | mountpoint-util.c |
145 | mountpoint-util.h | |
0cb8e3d1 LP |
146 | namespace-util.c |
147 | namespace-util.h | |
37efbbd8 | 148 | nss-util.h |
d8b4d14d LP |
149 | nulstr-util.c |
150 | nulstr-util.h | |
37efbbd8 ZJS |
151 | ordered-set.c |
152 | ordered-set.h | |
153 | parse-util.c | |
154 | parse-util.h | |
155 | path-util.c | |
156 | path-util.h | |
e56f9ffe LP |
157 | plymouth-util.c |
158 | plymouth-util.h | |
37efbbd8 ZJS |
159 | prioq.c |
160 | prioq.h | |
161 | proc-cmdline.c | |
162 | proc-cmdline.h | |
163 | process-util.c | |
164 | process-util.h | |
9aef9a67 LP |
165 | procfs-util.c |
166 | procfs-util.h | |
37efbbd8 ZJS |
167 | random-util.c |
168 | random-util.h | |
169 | ratelimit.c | |
170 | ratelimit.h | |
171 | raw-clone.h | |
c52a937b | 172 | raw-reboot.h |
37efbbd8 ZJS |
173 | replace-var.c |
174 | replace-var.h | |
3c069cda LP |
175 | rlimit-util.c |
176 | rlimit-util.h | |
37efbbd8 ZJS |
177 | rm-rf.c |
178 | rm-rf.h | |
37efbbd8 ZJS |
179 | selinux-util.c |
180 | selinux-util.h | |
181 | set.h | |
182 | sigbus.c | |
183 | sigbus.h | |
184 | signal-util.c | |
185 | signal-util.h | |
186 | siphash24.c | |
187 | siphash24.h | |
188 | smack-util.c | |
189 | smack-util.h | |
190 | socket-label.c | |
191 | socket-util.c | |
192 | socket-util.h | |
760877e9 LP |
193 | sort-util.c |
194 | sort-util.h | |
37efbbd8 ZJS |
195 | sparse-endian.h |
196 | special.h | |
197 | stat-util.c | |
198 | stat-util.h | |
67e16c31 | 199 | static-destruct.h |
37efbbd8 ZJS |
200 | stdio-util.h |
201 | strbuf.c | |
202 | strbuf.h | |
203 | string-table.c | |
204 | string-table.h | |
205 | string-util.c | |
206 | string-util.h | |
207 | strv.c | |
208 | strv.h | |
209 | strxcpyx.c | |
210 | strxcpyx.h | |
211 | syslog-util.c | |
212 | syslog-util.h | |
213 | terminal-util.c | |
214 | terminal-util.h | |
215 | time-util.c | |
216 | time-util.h | |
e4de7287 LP |
217 | tmpfile-util.c |
218 | tmpfile-util.h | |
37efbbd8 ZJS |
219 | umask-util.h |
220 | unaligned.h | |
523578aa LP |
221 | unit-def.c |
222 | unit-def.h | |
18c528e9 LP |
223 | unit-name.c |
224 | unit-name.h | |
37efbbd8 ZJS |
225 | user-util.c |
226 | user-util.h | |
227 | utf8.c | |
228 | utf8.h | |
229 | util.c | |
230 | util.h | |
37efbbd8 ZJS |
231 | virt.c |
232 | virt.h | |
37efbbd8 ZJS |
233 | xattr-util.c |
234 | xattr-util.h | |
5c23128d ZJS |
235 | '''.split()) |
236 | ||
18bf324a | 237 | missing_audit_h = files('missing_audit.h') |
54480d64 | 238 | missing_capability_h = files('missing_capability.h') |
0b7d48f5 | 239 | missing_socket_h = files('missing_socket.h') |
5c23128d | 240 | |
5c23128d ZJS |
241 | generate_af_list = find_program('generate-af-list.sh') |
242 | af_list_txt = custom_target( | |
37efbbd8 ZJS |
243 | 'af-list.txt', |
244 | output : 'af-list.txt', | |
0b7d48f5 | 245 | command : [generate_af_list, cpp, config_h, missing_socket_h], |
37efbbd8 | 246 | capture : true) |
5c23128d ZJS |
247 | |
248 | generate_arphrd_list = find_program('generate-arphrd-list.sh') | |
249 | arphrd_list_txt = custom_target( | |
37efbbd8 ZJS |
250 | 'arphrd-list.txt', |
251 | output : 'arphrd-list.txt', | |
01234e1f | 252 | command : [generate_arphrd_list, cpp, config_h], |
37efbbd8 | 253 | capture : true) |
5c23128d ZJS |
254 | |
255 | generate_cap_list = find_program('generate-cap-list.sh') | |
256 | cap_list_txt = custom_target( | |
37efbbd8 ZJS |
257 | 'cap-list.txt', |
258 | output : 'cap-list.txt', | |
54480d64 | 259 | command : [generate_cap_list, cpp, config_h, missing_capability_h], |
37efbbd8 | 260 | capture : true) |
5c23128d ZJS |
261 | |
262 | generate_errno_list = find_program('generate-errno-list.sh') | |
263 | errno_list_txt = custom_target( | |
37efbbd8 ZJS |
264 | 'errno-list.txt', |
265 | output : 'errno-list.txt', | |
266 | command : [generate_errno_list, cpp], | |
267 | capture : true) | |
5c23128d ZJS |
268 | |
269 | generated_gperf_headers = [] | |
270 | foreach item : [['af', af_list_txt, 'af', ''], | |
271 | ['arphrd', arphrd_list_txt, 'arphrd', 'ARPHRD_'], | |
272 | ['cap', cap_list_txt, 'capability', ''], | |
7b5e750d | 273 | ['errno', errno_list_txt, 'errno', '']] |
5c23128d | 274 | |
37efbbd8 ZJS |
275 | fname = '@0@-from-name.gperf'.format(item[0]) |
276 | gperf_file = custom_target( | |
277 | fname, | |
278 | input : item[1], | |
279 | output : fname, | |
280 | command : [generate_gperfs, item[2], item[3], '@INPUT@'], | |
281 | capture : true) | |
5c23128d | 282 | |
37efbbd8 ZJS |
283 | fname = '@0@-from-name.h'.format(item[0]) |
284 | target1 = custom_target( | |
285 | fname, | |
286 | input : gperf_file, | |
287 | output : fname, | |
288 | command : [gperf, | |
289 | '-L', 'ANSI-C', '-t', '--ignore-case', | |
290 | '-N', 'lookup_@0@'.format(item[2]), | |
291 | '-H', 'hash_@0@_name'.format(item[2]), | |
292 | '-p', '-C', | |
293 | '@INPUT@'], | |
294 | capture : true) | |
5c23128d | 295 | |
37efbbd8 ZJS |
296 | fname = '@0@-to-name.h'.format(item[0]) |
297 | awkscript = '@0@-to-name.awk'.format(item[0]) | |
298 | target2 = custom_target( | |
299 | fname, | |
300 | input : [awkscript, item[1]], | |
301 | output : fname, | |
302 | command : [awk, '-f', '@INPUT0@', '@INPUT1@'], | |
303 | capture : true) | |
5c23128d | 304 | |
37efbbd8 | 305 | generated_gperf_headers += [target1, target2] |
5c23128d ZJS |
306 | endforeach |
307 | ||
18bf324a | 308 | basic_sources += generated_gperf_headers |
975464e0 ZJS |
309 | basic_gcrypt_sources = files( |
310 | 'gcrypt-util.c', | |
311 | 'gcrypt-util.h') | |
5c23128d ZJS |
312 | |
313 | libbasic = static_library( | |
37efbbd8 ZJS |
314 | 'basic', |
315 | basic_sources, | |
316 | include_directories : includes, | |
d1084aa2 LT |
317 | dependencies : [versiondep, |
318 | threads, | |
37efbbd8 | 319 | libcap, |
cd0b6c53 LP |
320 | libselinux, |
321 | libm], | |
2d4ceca8 | 322 | c_args : ['-fvisibility=default'], |
37efbbd8 | 323 | install : false) |
34e221a5 ZJS |
324 | |
325 | # A convenience library that is separate from libbasic to avoid | |
326 | # unnecessary linking to libgcrypt. | |
327 | libbasic_gcrypt = static_library( | |
328 | 'basic-gcrypt', | |
975464e0 | 329 | basic_gcrypt_sources, |
34e221a5 ZJS |
330 | include_directories : includes, |
331 | dependencies : [libgcrypt], | |
332 | c_args : ['-fvisibility=default']) |