]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/shared/meson.build
build(deps): bump meson from 0.60.3 to 0.61.2 in /.github/workflows
[thirdparty/systemd.git] / src / shared / meson.build
CommitLineData
db9ecf05 1# SPDX-License-Identifier: LGPL-2.1-or-later
3a726fcd 2
975464e0 3shared_sources = files('''
37efbbd8
ZJS
4 acl-util.h
5 acpi-fpdt.c
6 acpi-fpdt.h
7 apparmor-util.c
8 apparmor-util.h
9 ask-password-api.c
10 ask-password-api.h
d284b82b
ZJS
11 barrier.c
12 barrier.h
37efbbd8
ZJS
13 base-filesystem.c
14 base-filesystem.h
965cc994
LP
15 binfmt-util.c
16 binfmt-util.h
d284b82b
ZJS
17 bitmap.c
18 bitmap.h
19 blkid-util.h
b25a930f
ZJS
20 blockdev-util.c
21 blockdev-util.h
5fe5908e
SS
22 bond-util.c
23 bond-util.h
37efbbd8
ZJS
24 boot-timestamps.c
25 boot-timestamps.h
7e87c7d9
ZJS
26 bootspec.c
27 bootspec.h
c5fd89ad
LB
28 bpf-dlopen.c
29 bpf-dlopen.h
d284b82b
ZJS
30 bpf-program.c
31 bpf-program.h
af94bb24
SS
32 bridge-util.c
33 bridge-util.h
b25a930f
ZJS
34 btrfs-util.c
35 btrfs-util.h
40af3d02
LP
36 bus-get-properties.c
37 bus-get-properties.h
54e27bb5
VC
38 bus-locator.c
39 bus-locator.h
052740e2
LP
40 bus-log-control-api.c
41 bus-log-control-api.h
807542be
LP
42 bus-map-properties.c
43 bus-map-properties.h
97600989
YW
44 bus-message-util.c
45 bus-message-util.h
c664cf56
LP
46 bus-object.c
47 bus-object.h
052740e2
LP
48 bus-polkit.c
49 bus-polkit.h
9176326b
LP
50 bus-print-properties.c
51 bus-print-properties.h
9f717d42
LP
52 bus-unit-procs.c
53 bus-unit-procs.h
37efbbd8
ZJS
54 bus-unit-util.c
55 bus-unit-util.h
56 bus-util.c
57 bus-util.h
e45c81b8
LP
58 bus-wait-for-jobs.c
59 bus-wait-for-jobs.h
3572d3df
LP
60 bus-wait-for-units.c
61 bus-wait-for-units.h
d284b82b
ZJS
62 calendarspec.c
63 calendarspec.h
fdb3deca
ZJS
64 cgroup-setup.c
65 cgroup-setup.h
37efbbd8
ZJS
66 cgroup-show.c
67 cgroup-show.h
417a6eec
LP
68 chown-recursive.c
69 chown-recursive.h
37efbbd8
ZJS
70 clean-ipc.c
71 clean-ipc.h
d284b82b
ZJS
72 clock-util.c
73 clock-util.h
37efbbd8
ZJS
74 condition.c
75 condition.h
76 conf-parser.c
77 conf-parser.h
b25a930f
ZJS
78 copy.c
79 copy.h
b34612bd
ZJS
80 coredump-util.c
81 coredump-util.h
d284b82b
ZJS
82 cpu-set-util.c
83 cpu-set-util.h
8f860b4d
LP
84 creds-util.c
85 creds-util.h
1e2f3230
LP
86 cryptsetup-util.c
87 cryptsetup-util.h
c157884f 88 daemon-util.h
b25a930f
ZJS
89 data-fd-util.c
90 data-fd-util.h
37efbbd8
ZJS
91 dev-setup.c
92 dev-setup.h
902b4c67
YW
93 device-nodes.c
94 device-nodes.h
0f46548d 95 devnode-acl.h
57f1b61b
LP
96 discover-image.c
97 discover-image.h
37efbbd8
ZJS
98 dissect-image.c
99 dissect-image.h
2d32453b
ZJS
100 dlfcn-util.c
101 dlfcn-util.h
a709a315
LP
102 dm-util.c
103 dm-util.h
37efbbd8
ZJS
104 dns-domain.c
105 dns-domain.h
106 dropin.c
107 dropin.h
0bb2f0f1
ZJS
108 efi-loader.c
109 efi-loader.h
56f2a729
LB
110 elf-util.c
111 elf-util.h
a5d8835c 112 enable-mempool.c
686d13b9
LP
113 env-file-label.c
114 env-file-label.h
5c2316c6
YW
115 ethtool-util.c
116 ethtool-util.h
d284b82b
ZJS
117 exec-util.c
118 exec-util.h
119 exit-status.c
120 exit-status.h
fd03a6a9
ZJS
121 extension-release.c
122 extension-release.h
4dc07c3a 123 fdisk-util.h
37efbbd8
ZJS
124 fdset.c
125 fdset.h
d284b82b
ZJS
126 fileio-label.c
127 fileio-label.h
715a70e7 128 firewall-util-nft.c
31220972 129 firewall-util-private.h
8940baac
YW
130 firewall-util.c
131 firewall-util.h
d284b82b
ZJS
132 format-table.c
133 format-table.h
b67f05da 134 fsck-util.h
37efbbd8
ZJS
135 fstab-util.c
136 fstab-util.h
37efbbd8
ZJS
137 generator.c
138 generator.h
3039cc02
SS
139 geneve-util.c
140 geneve-util.h
19ce38ce 141 gpt.c
37efbbd8 142 gpt.h
71d0b9d4
LP
143 group-record.c
144 group-record.h
e2054217
ZJS
145 hostname-setup.c
146 hostname-setup.h
37350b81
ZJS
147 hwdb-util.c
148 hwdb-util.h
ff7dad48
ZJS
149 id128-print.c
150 id128-print.h
4917e7c7
LP
151 idn-util.c
152 idn-util.h
37efbbd8
ZJS
153 ima-util.c
154 ima-util.h
155 import-util.c
156 import-util.h
bffaa49e
YW
157 in-addr-prefix-util.c
158 in-addr-prefix-util.h
37efbbd8 159 initreq.h
235be6bc
LP
160 install-file.c
161 install-file.h
37efbbd8
ZJS
162 install-printf.c
163 install-printf.h
d68c645b
LP
164 install.c
165 install.h
f079c372
LP
166 ip-protocol-list.c
167 ip-protocol-list.h
f69c2926
ZJS
168 ipvlan-util.c
169 ipvlan-util.h
d284b82b
ZJS
170 journal-importer.c
171 journal-importer.h
37efbbd8
ZJS
172 journal-util.c
173 journal-util.h
d284b82b
ZJS
174 json-internal.h
175 json.c
176 json.h
315edc2c
ZJS
177 kbd-util.c
178 kbd-util.h
cbae575e
LP
179 keyring-util.h
180 keyring-util.c
bac11cd6
YW
181 killall.c
182 killall.h
b25a930f
ZJS
183 label.c
184 label.h
42f3b2f9
LP
185 libcrypt-util.c
186 libcrypt-util.h
69cb2896
LP
187 libfido2-util.c
188 libfido2-util.h
fb36b133 189 libmount-util.h
01234e1f
YW
190 linux/auto_dev-ioctl.h
191 linux/bpf.h
192 linux/bpf_common.h
193 linux/bpf_insn.h
194 linux/dm-ioctl.h
195 linux/ethtool.h
733cbd00
LP
196 local-addresses.c
197 local-addresses.h
d284b82b
ZJS
198 lockfile-util.c
199 lockfile-util.h
e67ae9f5 200 log-link.h
37efbbd8
ZJS
201 logs-show.c
202 logs-show.h
203 loop-util.c
204 loop-util.h
bac11cd6
YW
205 loopback-setup.c
206 loopback-setup.h
207 machine-id-setup.c
208 machine-id-setup.h
37efbbd8
ZJS
209 machine-pool.c
210 machine-pool.h
d5167480
SS
211 macvlan-util.c
212 macvlan-util.h
294bf0c3 213 main-func.h
b25a930f 214 mkdir-label.c
35cd0ba5 215 mkdir-label.h
c95f9a23
LP
216 mkfs-util.c
217 mkfs-util.h
3cb9b42a 218 module-util.h
bac11cd6
YW
219 mount-setup.c
220 mount-setup.h
77c772f2
ZJS
221 mount-util.c
222 mount-util.h
7e19cc54
YW
223 net-condition.c
224 net-condition.h
b355d0c9
LP
225 netif-naming-scheme.c
226 netif-naming-scheme.h
b4fd34d8
YW
227 netif-sriov.c
228 netif-sriov.h
b5cc5591
YW
229 netif-util.c
230 netif-util.h
f079c372 231 nscd-flush.h
37efbbd8
ZJS
232 nsflags.c
233 nsflags.h
1808f768
MS
234 numa-util.c
235 numa-util.h
f2d5df8a 236 openssl-util.c
3f637019 237 openssl-util.h
37efbbd8
ZJS
238 output-mode.c
239 output-mode.h
294bf0c3
ZJS
240 pager.c
241 pager.h
86beb213
ZJS
242 parse-argument.c
243 parse-argument.h
8bd095aa
JK
244 parse-socket-bind-item.c
245 parse-socket-bind-item.h
ee48779e
DDM
246 pcre2-dlopen.c
247 pcre2-dlopen.h
5e146a75 248 pe-header.h
839fddbe
LP
249 pkcs11-util.c
250 pkcs11-util.h
294bf0c3
ZJS
251 pretty-print.c
252 pretty-print.h
42b83e8e
AZ
253 psi-util.c
254 psi-util.h
37efbbd8
ZJS
255 ptyfwd.c
256 ptyfwd.h
679badd7
LP
257 pwquality-util.c
258 pwquality-util.h
f1b82359
ZJS
259 qrcode-util.c
260 qrcode-util.h
26861143
ZJS
261 quota-util.c
262 quota-util.h
d284b82b
ZJS
263 reboot-util.c
264 reboot-util.h
28937bcc
LP
265 resize-fs.c
266 resize-fs.h
37efbbd8
ZJS
267 resolve-util.c
268 resolve-util.h
b25a930f
ZJS
269 rm-rf.c
270 rm-rf.h
37efbbd8 271 seccomp-util.h
d284b82b
ZJS
272 securebits-util.c
273 securebits-util.h
b25a930f
ZJS
274 selinux-util.c
275 selinux-util.h
d68c645b
LP
276 serialize.c
277 serialize.h
53f7f7fc
ZJS
278 service-util.c
279 service-util.h
37efbbd8
ZJS
280 sleep-config.c
281 sleep-config.h
b25a930f
ZJS
282 smack-util.c
283 smack-util.h
284 socket-label.c
5c3fa98d
ZJS
285 socket-netlink.c
286 socket-netlink.h
37efbbd8
ZJS
287 spawn-ask-password-agent.c
288 spawn-ask-password-agent.h
289 spawn-polkit-agent.c
290 spawn-polkit-agent.h
291 specifier.c
292 specifier.h
293 switch-root.c
294 switch-root.h
e4de7287
LP
295 tmpfile-util-label.c
296 tmpfile-util-label.h
ed440f6b
SL
297 tomoyo-util.c
298 tomoyo-util.h
5e521624
LP
299 tpm2-util.c
300 tpm2-util.h
b237a168 301 udev-util.c
d68c645b 302 udev-util.h
b085d224
LP
303 uid-alloc-range.c
304 uid-alloc-range.h
37efbbd8
ZJS
305 uid-range.c
306 uid-range.h
9b2d9078
LP
307 user-record-nss.c
308 user-record-nss.h
295c1a6e
LP
309 user-record-show.c
310 user-record-show.h
71d0b9d4
LP
311 user-record.c
312 user-record.h
85f088ab
LP
313 userdb-dropin.c
314 userdb-dropin.h
f69c2926
ZJS
315 userdb.c
316 userdb.h
37efbbd8 317 utmp-wtmp.h
d41bd96f
LP
318 varlink.c
319 varlink.h
a87b151a
DDM
320 verb-log-control.c
321 verb-log-control.h
d284b82b
ZJS
322 verbs.c
323 verbs.h
37efbbd8
ZJS
324 vlan-util.c
325 vlan-util.h
326 volatile-util.c
327 volatile-util.h
328 watchdog.c
329 watchdog.h
d284b82b
ZJS
330 web-util.c
331 web-util.h
b492aea0
ZJS
332 wifi-util.c
333 wifi-util.h
d284b82b
ZJS
334 xml.c
335 xml.h
975464e0 336'''.split())
5c23128d 337
b9fa9b71 338if get_option('tests') != 'false'
b5c34d6b
YW
339 shared_sources += files('''
340 test-tables.h
341 tests.c
342 tests.h
343 '''.split())
b9fa9b71
MO
344endif
345
95aac012
ZJS
346generate_syscall_list = find_program('generate-syscall-list.py')
347fname = 'syscall-list.h'
348syscall_list_h = custom_target(
349 fname,
984b5296 350 input : syscall_list_txt,
95aac012
ZJS
351 output : fname,
352 command : [generate_syscall_list,
353 '@INPUT@'],
354 capture : true)
355
349cc4a5 356if conf.get('HAVE_ACL') == 1
0f46548d
YW
357 shared_sources += files('''
358 acl-util.c
359 devnode-acl.c
360 '''.split())
5c23128d
ZJS
361endif
362
3211da4b 363if conf.get('ENABLE_UTMP') == 1
975464e0 364 shared_sources += files('utmp-wtmp.c')
5c23128d
ZJS
365endif
366
349cc4a5 367if conf.get('HAVE_SECCOMP') == 1
975464e0 368 shared_sources += files('seccomp-util.c')
95aac012 369 shared_sources += syscall_list_h
5c23128d
ZJS
370endif
371
349cc4a5 372if conf.get('HAVE_LIBIPTC') == 1
31220972 373 shared_sources += files('firewall-util-iptables.c')
c3045943
MB
374endif
375
43b3f0fb
JK
376if conf.get('HAVE_LIBBPF') == 1
377 shared_sources += files('''
378 bpf-link.c
379 bpf-link.h
380 '''.split())
381endif
382
ba323bbe
YW
383if conf.get('HAVE_KMOD') == 1
384 shared_sources += files('module-util.c')
385endif
386
cef9f2a6 387if conf.get('HAVE_PAM') == 1
c5abccfa
YW
388 shared_sources += files(
389 'pam-util.c',
390 'pam-util.h')
cef9f2a6
LP
391endif
392
7e0079f9
ZJS
393if conf.get('ENABLE_NSCD') == 1
394 shared_sources += files('nscd-flush.c')
395endif
396
da96ad5a
YW
397generate_ip_protocol_list = find_program('generate-ip-protocol-list.sh')
398ip_protocol_list_txt = custom_target(
399 'ip-protocol-list.txt',
400 output : 'ip-protocol-list.txt',
401 command : [generate_ip_protocol_list, cpp],
7b5e750d
YW
402 capture : true)
403
da96ad5a 404fname = 'ip-protocol-from-name.gperf'
7b5e750d
YW
405gperf_file = custom_target(
406 fname,
da96ad5a 407 input : ip_protocol_list_txt,
7b5e750d 408 output : fname,
da96ad5a 409 command : [generate_gperfs, 'ip_protocol', 'IPPROTO_', '@INPUT@'],
7b5e750d
YW
410 capture : true)
411
da96ad5a 412fname = 'ip-protocol-from-name.h'
7b5e750d
YW
413target1 = custom_target(
414 fname,
415 input : gperf_file,
416 output : fname,
417 command : [gperf,
418 '-L', 'ANSI-C', '-t', '--ignore-case',
da96ad5a
YW
419 '-N', 'lookup_ip_protocol',
420 '-H', 'hash_ip_protocol_name',
7b5e750d
YW
421 '-p', '-C',
422 '@INPUT@'],
423 capture : true)
424
da96ad5a
YW
425fname = 'ip-protocol-to-name.h'
426awkscript = 'ip-protocol-to-name.awk'
7b5e750d
YW
427target2 = custom_target(
428 fname,
da96ad5a 429 input : [awkscript, ip_protocol_list_txt],
7b5e750d
YW
430 output : fname,
431 command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
432 capture : true)
433
dca23091
YW
434shared_generated_gperf_headers = [target1, target2]
435shared_sources += shared_generated_gperf_headers
7b5e750d 436
a2b0cd3f 437libshared_name = 'systemd-shared-@0@'.format(shared_lib_tag)
5c23128d 438
4b57a272 439libshared_deps = [threads,
4b57a272 440 libacl,
462255c6
LP
441 libblkid,
442 libcap,
42f3b2f9 443 libcrypt,
c5fd89ad 444 libdl,
4b57a272
ZJS
445 libgcrypt,
446 libiptc,
3cb9b42a 447 libkmod,
462255c6 448 liblz4,
77c772f2 449 libmount,
839fddbe
LP
450 libopenssl,
451 libp11kit,
cef9f2a6 452 libpam,
462255c6 453 librt,
4b57a272
ZJS
454 libseccomp,
455 libselinux,
ef5924aa 456 libzstd,
462255c6 457 libxz]
4b57a272 458
4f5993c3
FS
459libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir())
460
2d4ceca8 461libshared_static = static_library(
37efbbd8
ZJS
462 libshared_name,
463 shared_sources,
2d4ceca8
ZJS
464 include_directories : includes,
465 dependencies : libshared_deps,
03f7ddf0
ZJS
466 c_args : ['-fvisibility=default'],
467 build_by_default : false)
2d4ceca8
ZJS
468
469libshared = shared_library(
470 libshared_name,
37efbbd8 471 include_directories : includes,
4287c855 472 c_args : ['-fvisibility=default'],
4f5993c3 473 link_args : ['-shared',
2d4ceca8
ZJS
474 '-Wl,--version-script=' + libshared_sym_path],
475 link_whole : [libshared_static,
34e221a5 476 libbasic,
a8e559d4 477 libbasic_gcrypt,
99b9f8fd 478 libsystemd_static],
4b57a272 479 dependencies : libshared_deps,
37efbbd8
ZJS
480 install : true,
481 install_dir : rootlibexecdir)