]>
Commit | Line | Data |
---|---|---|
db9ecf05 | 1 | # SPDX-License-Identifier: LGPL-2.1-or-later |
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 | |
91b79ba8 | 22 | build.c |
37efbbd8 ZJS |
23 | build.h |
24 | bus-label.c | |
25 | bus-label.h | |
37efbbd8 ZJS |
26 | cap-list.c |
27 | cap-list.h | |
71e5200f DM |
28 | capability-util.c |
29 | capability-util.h | |
37efbbd8 ZJS |
30 | cgroup-util.c |
31 | cgroup-util.h | |
32 | chattr-util.c | |
33 | chattr-util.h | |
37efbbd8 ZJS |
34 | conf-files.c |
35 | conf-files.h | |
36 | copy.c | |
37 | copy.h | |
786d19fd LP |
38 | creds-util.c |
39 | creds-util.h | |
37efbbd8 ZJS |
40 | def.h |
41 | device-nodes.c | |
42 | device-nodes.h | |
43 | dirent-util.c | |
44 | dirent-util.h | |
49b19567 | 45 | dlfcn-util.c |
88d775b7 | 46 | dlfcn-util.h |
c11e5f43 | 47 | dns-def.h |
0bb2f0f1 ZJS |
48 | efivars.c |
49 | efivars.h | |
686d13b9 LP |
50 | env-file.c |
51 | env-file.h | |
37efbbd8 ZJS |
52 | env-util.c |
53 | env-util.h | |
54 | errno-list.c | |
55 | errno-list.h | |
2b2fec7d | 56 | errno-util.h |
37efbbd8 ZJS |
57 | escape.c |
58 | escape.h | |
59 | ether-addr-util.c | |
60 | ether-addr-util.h | |
37efbbd8 ZJS |
61 | extract-word.c |
62 | extract-word.h | |
63 | fd-util.c | |
64 | fd-util.h | |
71e5200f DM |
65 | fileio.c |
66 | fileio.h | |
7f686722 | 67 | format-util.c |
37efbbd8 ZJS |
68 | format-util.h |
69 | fs-util.c | |
70 | fs-util.h | |
71 | glob-util.c | |
72 | glob-util.h | |
73 | gunicode.c | |
74 | gunicode.h | |
75 | hash-funcs.c | |
76 | hash-funcs.h | |
77 | hashmap.c | |
78 | hashmap.h | |
79 | hexdecoct.c | |
80 | hexdecoct.h | |
81 | hostname-util.c | |
82 | hostname-util.h | |
83 | in-addr-util.c | |
84 | in-addr-util.h | |
37efbbd8 ZJS |
85 | io-util.c |
86 | io-util.h | |
71e5200f | 87 | ioprio.h |
37efbbd8 ZJS |
88 | khash.c |
89 | khash.h | |
90 | label.c | |
91 | label.h | |
eefc66aa LP |
92 | limits-util.c |
93 | limits-util.h | |
01234e1f YW |
94 | linux/btrfs.h |
95 | linux/btrfs_tree.h | |
473a64e5 | 96 | linux/can/netlink.h |
01234e1f YW |
97 | linux/can/vxcan.h |
98 | linux/fib_rules.h | |
99 | linux/fou.h | |
473a64e5 | 100 | linux/hdlc/ioctl.h |
01234e1f YW |
101 | linux/if.h |
102 | linux/if_addr.h | |
103 | linux/if_arp.h | |
104 | linux/if_bonding.h | |
105 | linux/if_bridge.h | |
ac9b1727 | 106 | linux/if_ether.h |
01234e1f | 107 | linux/if_link.h |
45cae4ab | 108 | linux/if_macsec.h |
01234e1f YW |
109 | linux/if_tun.h |
110 | linux/if_tunnel.h | |
7057b614 YW |
111 | linux/in.h |
112 | linux/in6.h | |
b2f61e0d | 113 | linux/ipv6_route.h |
aa812904 | 114 | linux/l2tp.h |
01234e1f | 115 | linux/libc-compat.h |
510ca79c | 116 | linux/loadavg.h |
76566792 | 117 | linux/netdevice.h |
ec87f63c YW |
118 | linux/netfilter/nf_tables.h |
119 | linux/netfilter/nfnetlink.h | |
01234e1f | 120 | linux/netlink.h |
ec87f63c | 121 | linux/nexthop.h |
2e385c48 | 122 | linux/nl80211.h |
ec87f63c | 123 | linux/pkt_sched.h |
01234e1f YW |
124 | linux/rtnetlink.h |
125 | linux/wireguard.h | |
37efbbd8 ZJS |
126 | list.h |
127 | locale-util.c | |
128 | locale-util.h | |
37efbbd8 ZJS |
129 | log.c |
130 | log.h | |
131 | login-util.c | |
132 | login-util.h | |
133 | macro.h | |
134 | memfd-util.c | |
135 | memfd-util.h | |
0a970718 LP |
136 | memory-util.c |
137 | memory-util.h | |
37efbbd8 ZJS |
138 | mempool.c |
139 | mempool.h | |
0e7117d0 | 140 | missing_audit.h |
8ca2702f | 141 | missing_capability.h |
5b139f86 | 142 | missing_drm.h |
dea72eda | 143 | missing_fcntl.h |
503f480f | 144 | missing_fs.h |
31c2ddab | 145 | missing_input.h |
d7276b61 | 146 | missing_keyctl.h |
1e54f0ab | 147 | missing_magic.h |
c8a363eb | 148 | missing_mman.h |
475c18f0 | 149 | missing_network.h |
2a03bb3e | 150 | missing_prctl.h |
b19bb111 | 151 | missing_random.h |
6c76de27 | 152 | missing_resource.h |
22332e33 | 153 | missing_sched.h |
3843e826 | 154 | missing_securebits.h |
66ffbdf9 | 155 | missing_socket.h |
e01819f8 | 156 | missing_stat.h |
470f348b | 157 | missing_stdlib.h |
37efbbd8 | 158 | missing_syscall.h |
d7330b60 | 159 | missing_timerfd.h |
38e0c63d | 160 | missing_type.h |
71e5200f | 161 | mkdir-label.c |
37efbbd8 ZJS |
162 | mkdir.c |
163 | mkdir.h | |
049af8ad ZJS |
164 | mountpoint-util.c |
165 | mountpoint-util.h | |
0cb8e3d1 LP |
166 | namespace-util.c |
167 | namespace-util.h | |
37efbbd8 | 168 | nss-util.h |
d8b4d14d LP |
169 | nulstr-util.c |
170 | nulstr-util.h | |
37efbbd8 ZJS |
171 | ordered-set.c |
172 | ordered-set.h | |
6ef06723 ZJS |
173 | os-util.c |
174 | os-util.h | |
37efbbd8 ZJS |
175 | parse-util.c |
176 | parse-util.h | |
09e6443e ZJS |
177 | path-lookup.c |
178 | path-lookup.h | |
37efbbd8 ZJS |
179 | path-util.c |
180 | path-util.h | |
ed5033fd LP |
181 | percent-util.c |
182 | percent-util.h | |
37efbbd8 ZJS |
183 | prioq.c |
184 | prioq.h | |
185 | proc-cmdline.c | |
186 | proc-cmdline.h | |
187 | process-util.c | |
188 | process-util.h | |
9aef9a67 LP |
189 | procfs-util.c |
190 | procfs-util.h | |
29d4392c | 191 | pthread-util.h |
845a7c1f LP |
192 | quota-util.c |
193 | quota-util.h | |
37efbbd8 ZJS |
194 | random-util.c |
195 | random-util.h | |
196 | ratelimit.c | |
197 | ratelimit.h | |
198 | raw-clone.h | |
c52a937b | 199 | raw-reboot.h |
73d874ba LP |
200 | recovery-key.c |
201 | recovery-key.h | |
37efbbd8 ZJS |
202 | replace-var.c |
203 | replace-var.h | |
3c069cda LP |
204 | rlimit-util.c |
205 | rlimit-util.h | |
37efbbd8 ZJS |
206 | rm-rf.c |
207 | rm-rf.h | |
37efbbd8 ZJS |
208 | selinux-util.c |
209 | selinux-util.h | |
210 | set.h | |
211 | sigbus.c | |
212 | sigbus.h | |
213 | signal-util.c | |
214 | signal-util.h | |
215 | siphash24.c | |
216 | siphash24.h | |
217 | smack-util.c | |
218 | smack-util.h | |
219 | socket-label.c | |
220 | socket-util.c | |
221 | socket-util.h | |
760877e9 LP |
222 | sort-util.c |
223 | sort-util.h | |
37efbbd8 ZJS |
224 | sparse-endian.h |
225 | special.h | |
226 | stat-util.c | |
227 | stat-util.h | |
67e16c31 | 228 | static-destruct.h |
37efbbd8 ZJS |
229 | stdio-util.h |
230 | strbuf.c | |
231 | strbuf.h | |
232 | string-table.c | |
233 | string-table.h | |
234 | string-util.c | |
235 | string-util.h | |
236 | strv.c | |
237 | strv.h | |
238 | strxcpyx.c | |
239 | strxcpyx.h | |
b0ffd276 LP |
240 | sysctl-util.c |
241 | sysctl-util.h | |
37efbbd8 ZJS |
242 | syslog-util.c |
243 | syslog-util.h | |
244 | terminal-util.c | |
245 | terminal-util.h | |
246 | time-util.c | |
247 | time-util.h | |
e4de7287 LP |
248 | tmpfile-util.c |
249 | tmpfile-util.h | |
37efbbd8 ZJS |
250 | umask-util.h |
251 | unaligned.h | |
523578aa LP |
252 | unit-def.c |
253 | unit-def.h | |
af182ae1 YW |
254 | unit-file.c |
255 | unit-file.h | |
18c528e9 LP |
256 | unit-name.c |
257 | unit-name.h | |
37efbbd8 ZJS |
258 | user-util.c |
259 | user-util.h | |
260 | utf8.c | |
261 | utf8.h | |
262 | util.c | |
263 | util.h | |
37efbbd8 ZJS |
264 | virt.c |
265 | virt.h | |
37efbbd8 ZJS |
266 | xattr-util.c |
267 | xattr-util.h | |
5c23128d ZJS |
268 | '''.split()) |
269 | ||
18bf324a | 270 | missing_audit_h = files('missing_audit.h') |
54480d64 | 271 | missing_capability_h = files('missing_capability.h') |
0b7d48f5 | 272 | missing_socket_h = files('missing_socket.h') |
5c23128d | 273 | |
35b42e56 ZJS |
274 | missing_syscall_def_h = files('missing_syscall_def.h') |
275 | basic_sources += missing_syscall_def_h | |
276 | ||
5c23128d ZJS |
277 | generate_af_list = find_program('generate-af-list.sh') |
278 | af_list_txt = custom_target( | |
37efbbd8 ZJS |
279 | 'af-list.txt', |
280 | output : 'af-list.txt', | |
0b7d48f5 | 281 | command : [generate_af_list, cpp, config_h, missing_socket_h], |
37efbbd8 | 282 | capture : true) |
5c23128d ZJS |
283 | |
284 | generate_arphrd_list = find_program('generate-arphrd-list.sh') | |
285 | arphrd_list_txt = custom_target( | |
37efbbd8 ZJS |
286 | 'arphrd-list.txt', |
287 | output : 'arphrd-list.txt', | |
01234e1f | 288 | command : [generate_arphrd_list, cpp, config_h], |
37efbbd8 | 289 | capture : true) |
5c23128d ZJS |
290 | |
291 | generate_cap_list = find_program('generate-cap-list.sh') | |
292 | cap_list_txt = custom_target( | |
37efbbd8 ZJS |
293 | 'cap-list.txt', |
294 | output : 'cap-list.txt', | |
54480d64 | 295 | command : [generate_cap_list, cpp, config_h, missing_capability_h], |
37efbbd8 | 296 | capture : true) |
5c23128d ZJS |
297 | |
298 | generate_errno_list = find_program('generate-errno-list.sh') | |
299 | errno_list_txt = custom_target( | |
37efbbd8 ZJS |
300 | 'errno-list.txt', |
301 | output : 'errno-list.txt', | |
302 | command : [generate_errno_list, cpp], | |
303 | capture : true) | |
5c23128d ZJS |
304 | |
305 | generated_gperf_headers = [] | |
306 | foreach item : [['af', af_list_txt, 'af', ''], | |
307 | ['arphrd', arphrd_list_txt, 'arphrd', 'ARPHRD_'], | |
308 | ['cap', cap_list_txt, 'capability', ''], | |
7b5e750d | 309 | ['errno', errno_list_txt, 'errno', '']] |
5c23128d | 310 | |
37efbbd8 ZJS |
311 | fname = '@0@-from-name.gperf'.format(item[0]) |
312 | gperf_file = custom_target( | |
313 | fname, | |
314 | input : item[1], | |
315 | output : fname, | |
316 | command : [generate_gperfs, item[2], item[3], '@INPUT@'], | |
317 | capture : true) | |
5c23128d | 318 | |
37efbbd8 ZJS |
319 | fname = '@0@-from-name.h'.format(item[0]) |
320 | target1 = custom_target( | |
321 | fname, | |
322 | input : gperf_file, | |
323 | output : fname, | |
324 | command : [gperf, | |
325 | '-L', 'ANSI-C', '-t', '--ignore-case', | |
326 | '-N', 'lookup_@0@'.format(item[2]), | |
327 | '-H', 'hash_@0@_name'.format(item[2]), | |
328 | '-p', '-C', | |
329 | '@INPUT@'], | |
330 | capture : true) | |
5c23128d | 331 | |
37efbbd8 ZJS |
332 | fname = '@0@-to-name.h'.format(item[0]) |
333 | awkscript = '@0@-to-name.awk'.format(item[0]) | |
334 | target2 = custom_target( | |
335 | fname, | |
336 | input : [awkscript, item[1]], | |
337 | output : fname, | |
338 | command : [awk, '-f', '@INPUT0@', '@INPUT1@'], | |
339 | capture : true) | |
5c23128d | 340 | |
37efbbd8 | 341 | generated_gperf_headers += [target1, target2] |
5c23128d ZJS |
342 | endforeach |
343 | ||
18bf324a | 344 | basic_sources += generated_gperf_headers |
9a6da617 ZJS |
345 | |
346 | ############################################################ | |
347 | ||
348 | arch_list = [ | |
349 | 'alpha', | |
350 | 'arc', | |
351 | 'arm', | |
352 | 'arm64', | |
353 | 'i386', | |
354 | 'ia64', | |
355 | 'm68k', | |
356 | 'mips64', | |
357 | 'mips64n32', | |
358 | 'mipso32', | |
359 | 'powerpc', | |
360 | 'powerpc64', | |
361 | 's390', | |
362 | 's390x', | |
363 | 'sparc', | |
364 | 'x86_64'] | |
365 | ||
366 | run_target( | |
367 | 'update-syscall-tables', | |
d3821a33 | 368 | command : [update_syscall_tables_sh, meson.current_source_dir()] + arch_list) |
9a6da617 | 369 | |
984b5296 | 370 | syscall_list_txt = files('syscall-list.txt') |
35b42e56 ZJS |
371 | |
372 | syscall_lists = [] | |
373 | foreach arch: arch_list | |
1f6f8cc8 | 374 | syscall_lists += files('syscalls-@0@.txt'.format(arch)) |
35b42e56 ZJS |
375 | endforeach |
376 | ||
377 | missing_syscalls_py = find_program('missing_syscalls.py') | |
378 | ||
379 | run_target( | |
380 | 'update-syscall-header', | |
381 | command : [missing_syscalls_py, | |
382 | missing_syscall_def_h, | |
383 | syscall_lists]) | |
384 | ||
385 | ############################################################ | |
386 | ||
387 | libbasic = static_library( | |
388 | 'basic', | |
389 | basic_sources, | |
e5bc5f1f | 390 | fundamental_sources, |
8d40961c | 391 | include_directories : basic_includes, |
35b42e56 ZJS |
392 | dependencies : [versiondep, |
393 | threads, | |
394 | libcap, | |
395 | libseccomp, | |
396 | libselinux, | |
397 | libm, | |
398 | libdl], | |
399 | c_args : ['-fvisibility=default'], | |
400 | install : false) | |
401 | ||
402 | ############################################################ | |
403 | ||
404 | basic_gcrypt_sources = files( | |
405 | 'gcrypt-util.c', | |
406 | 'gcrypt-util.h') | |
407 | ||
408 | # A convenience library that is separate from libbasic to avoid | |
409 | # unnecessary linking to libgcrypt. | |
410 | libbasic_gcrypt = static_library( | |
411 | 'basic-gcrypt', | |
412 | basic_gcrypt_sources, | |
8d40961c | 413 | include_directories : basic_includes, |
35b42e56 ZJS |
414 | dependencies : [libgcrypt], |
415 | c_args : ['-fvisibility=default']) |