]>
Commit | Line | Data |
---|---|---|
db9ecf05 | 1 | # SPDX-License-Identifier: LGPL-2.1-or-later |
3a726fcd | 2 | |
f1b98127 | 3 | shared_sources = files( |
f1b98127 | 4 | 'acpi-fpdt.c', |
f1b98127 | 5 | 'apparmor-util.c', |
f1b98127 | 6 | 'ask-password-api.c', |
f1b98127 | 7 | 'barrier.c', |
f1b98127 | 8 | 'base-filesystem.c', |
af4e8e86 | 9 | 'battery-util.c', |
f1b98127 | 10 | 'binfmt-util.c', |
f1b98127 | 11 | 'bitmap.c', |
f1b98127 | 12 | 'blockdev-util.c', |
f1b98127 | 13 | 'bond-util.c', |
9e43296f | 14 | 'boot-entry.c', |
f1b98127 | 15 | 'boot-timestamps.c', |
f1b98127 | 16 | 'bootspec.c', |
f1b98127 | 17 | 'bpf-dlopen.c', |
f1b98127 | 18 | 'bpf-program.c', |
f1b98127 | 19 | 'bridge-util.c', |
f1b98127 | 20 | 'btrfs-util.c', |
f1b98127 | 21 | 'bus-get-properties.c', |
f1b98127 | 22 | 'bus-locator.c', |
f1b98127 | 23 | 'bus-log-control-api.c', |
f1b98127 | 24 | 'bus-map-properties.c', |
f1b98127 | 25 | 'bus-message-util.c', |
f1b98127 | 26 | 'bus-object.c', |
f1b98127 | 27 | 'bus-polkit.c', |
f1b98127 | 28 | 'bus-print-properties.c', |
f1b98127 | 29 | 'bus-unit-procs.c', |
f1b98127 | 30 | 'bus-unit-util.c', |
f1b98127 | 31 | 'bus-util.c', |
f1b98127 | 32 | 'bus-wait-for-jobs.c', |
f1b98127 | 33 | 'bus-wait-for-units.c', |
f1b98127 | 34 | 'calendarspec.c', |
f1b98127 | 35 | 'cgroup-setup.c', |
f1b98127 | 36 | 'cgroup-show.c', |
f1b98127 | 37 | 'chown-recursive.c', |
f1b98127 | 38 | 'clean-ipc.c', |
f1b98127 | 39 | 'clock-util.c', |
9b2c1614 | 40 | 'common-signal.c', |
a8835c11 | 41 | 'compare-operator.c', |
f1b98127 | 42 | 'condition.c', |
f1b98127 | 43 | 'conf-parser.c', |
f1b98127 | 44 | 'copy.c', |
f1b98127 | 45 | 'coredump-util.c', |
f1b98127 | 46 | 'cpu-set-util.c', |
f1b98127 | 47 | 'creds-util.c', |
f1b98127 | 48 | 'cryptsetup-util.c', |
50e23ac6 | 49 | 'daemon-util.c', |
f1b98127 | 50 | 'data-fd-util.c', |
f1b98127 | 51 | 'dev-setup.c', |
f1b98127 | 52 | 'device-nodes.c', |
f1b98127 | 53 | 'discover-image.c', |
f1b98127 | 54 | 'dissect-image.c', |
f1b98127 | 55 | 'dlfcn-util.c', |
f1b98127 | 56 | 'dm-util.c', |
f1b98127 | 57 | 'dns-domain.c', |
f1b98127 | 58 | 'dropin.c', |
a01c4bc9 | 59 | 'edit-util.c', |
7be4b236 | 60 | 'efi-api.c', |
f1b98127 | 61 | 'efi-loader.c', |
f1b98127 | 62 | 'elf-util.c', |
f1b98127 ZJS |
63 | 'enable-mempool.c', |
64 | 'env-file-label.c', | |
f1b98127 | 65 | 'ethtool-util.c', |
f1b98127 | 66 | 'exec-util.c', |
f1b98127 | 67 | 'exit-status.c', |
d51f8eb3 | 68 | 'extension-util.c', |
f1b98127 | 69 | 'fdset.c', |
f1b98127 | 70 | 'fileio-label.c', |
e94830c0 | 71 | 'find-esp.c', |
f1b98127 | 72 | 'firewall-util-nft.c', |
f1b98127 | 73 | 'firewall-util.c', |
f1b98127 | 74 | 'format-table.c', |
f1b98127 | 75 | 'fstab-util.c', |
f1b98127 | 76 | 'generator.c', |
f1b98127 | 77 | 'geneve-util.c', |
f1b98127 | 78 | 'gpt.c', |
f1b98127 | 79 | 'group-record.c', |
f1b98127 | 80 | 'hostname-setup.c', |
f1b98127 | 81 | 'hwdb-util.c', |
f1b98127 | 82 | 'id128-print.c', |
f1b98127 | 83 | 'idn-util.c', |
f1b98127 | 84 | 'ima-util.c', |
d452335a | 85 | 'image-policy.c', |
f1b98127 | 86 | 'import-util.c', |
f1b98127 | 87 | 'in-addr-prefix-util.c', |
f1b98127 | 88 | 'install-file.c', |
f1b98127 | 89 | 'install-printf.c', |
f1b98127 | 90 | 'install.c', |
f1b98127 | 91 | 'ip-protocol-list.c', |
f1b98127 | 92 | 'ipvlan-util.c', |
f1b98127 | 93 | 'journal-importer.c', |
f1b98127 | 94 | 'journal-util.c', |
f1b98127 | 95 | 'json.c', |
f1b98127 | 96 | 'kbd-util.c', |
5689e161 | 97 | 'kernel-image.c', |
f1b98127 ZJS |
98 | 'keyring-util.c', |
99 | 'killall.c', | |
0690160e | 100 | 'label-util.c', |
f1b98127 | 101 | 'libcrypt-util.c', |
f1b98127 | 102 | 'libfido2-util.c', |
08221c57 | 103 | 'libmount-util.c', |
f1b98127 | 104 | 'local-addresses.c', |
3d36b5d7 | 105 | 'locale-setup.c', |
f1b98127 | 106 | 'logs-show.c', |
f1b98127 | 107 | 'loop-util.c', |
f1b98127 | 108 | 'loopback-setup.c', |
b3a062cb | 109 | 'lsm-util.c', |
f1b98127 | 110 | 'machine-id-setup.c', |
f1b98127 | 111 | 'machine-pool.c', |
f1b98127 | 112 | 'macvlan-util.c', |
f1b98127 | 113 | 'mkdir-label.c', |
f1b98127 | 114 | 'mkfs-util.c', |
f1b98127 | 115 | 'mount-setup.c', |
f1b98127 | 116 | 'mount-util.c', |
f1b98127 | 117 | 'net-condition.c', |
f1b98127 | 118 | 'netif-naming-scheme.c', |
f1b98127 | 119 | 'netif-sriov.c', |
f1b98127 | 120 | 'netif-util.c', |
f1b98127 | 121 | 'nsflags.c', |
f1b98127 | 122 | 'numa-util.c', |
cd48e23f | 123 | 'open-file.c', |
f1b98127 | 124 | 'openssl-util.c', |
f1b98127 | 125 | 'output-mode.c', |
f1b98127 | 126 | 'pager.c', |
f1b98127 | 127 | 'parse-argument.c', |
c3eaba2d | 128 | 'parse-helpers.c', |
e30c1d01 | 129 | 'pcre2-util.c', |
f1b98127 | 130 | 'pkcs11-util.c', |
f1b98127 | 131 | 'pretty-print.c', |
f1b98127 | 132 | 'ptyfwd.c', |
f1b98127 | 133 | 'pwquality-util.c', |
f1b98127 | 134 | 'qrcode-util.c', |
f1b98127 | 135 | 'quota-util.c', |
f1b98127 | 136 | 'reboot-util.c', |
af72f975 | 137 | 'recovery-key.c', |
f1b98127 | 138 | 'resize-fs.c', |
f1b98127 | 139 | 'resolve-util.c', |
f1b98127 | 140 | 'rm-rf.c', |
f1b98127 | 141 | 'securebits-util.c', |
f1b98127 | 142 | 'selinux-util.c', |
f1b98127 | 143 | 'serialize.c', |
f1b98127 | 144 | 'service-util.c', |
4014172a | 145 | 'sleep-util.c', |
f1b98127 | 146 | 'smack-util.c', |
f1b98127 ZJS |
147 | 'socket-label.c', |
148 | 'socket-netlink.c', | |
f1b98127 | 149 | 'spawn-ask-password-agent.c', |
f1b98127 | 150 | 'spawn-polkit-agent.c', |
f1b98127 | 151 | 'specifier.c', |
f1b98127 | 152 | 'switch-root.c', |
f1b98127 | 153 | 'tmpfile-util-label.c', |
f1b98127 | 154 | 'tomoyo-util.c', |
f1b98127 | 155 | 'tpm2-util.c', |
f1b98127 | 156 | 'udev-util.c', |
f1b98127 | 157 | 'user-record-nss.c', |
f1b98127 | 158 | 'user-record-show.c', |
f1b98127 | 159 | 'user-record.c', |
f1b98127 | 160 | 'userdb-dropin.c', |
f1b98127 | 161 | 'userdb.c', |
f1b98127 | 162 | 'varlink.c', |
f1b98127 | 163 | 'verb-log-control.c', |
f1b98127 | 164 | 'verbs.c', |
f1b98127 | 165 | 'vlan-util.c', |
f1b98127 | 166 | 'volatile-util.c', |
f1b98127 | 167 | 'watchdog.c', |
f1b98127 | 168 | 'web-util.c', |
f1b98127 | 169 | 'wifi-util.c', |
f1b98127 | 170 | 'xml.c', |
2f492a73 | 171 | ) |
5c23128d | 172 | |
b9fa9b71 | 173 | if get_option('tests') != 'false' |
f1b98127 | 174 | shared_sources += files( |
f1b98127 | 175 | 'tests.c', |
2f492a73 | 176 | ) |
b9fa9b71 MO |
177 | endif |
178 | ||
95aac012 ZJS |
179 | generate_syscall_list = find_program('generate-syscall-list.py') |
180 | fname = 'syscall-list.h' | |
181 | syscall_list_h = custom_target( | |
182 | fname, | |
984b5296 | 183 | input : syscall_list_txt, |
95aac012 ZJS |
184 | output : fname, |
185 | command : [generate_syscall_list, | |
186 | '@INPUT@'], | |
187 | capture : true) | |
188 | ||
349cc4a5 | 189 | if conf.get('HAVE_ACL') == 1 |
f1b98127 ZJS |
190 | shared_sources += files( |
191 | 'acl-util.c', | |
2f492a73 ZJS |
192 | 'devnode-acl.c', |
193 | ) | |
5c23128d ZJS |
194 | endif |
195 | ||
3211da4b | 196 | if conf.get('ENABLE_UTMP') == 1 |
975464e0 | 197 | shared_sources += files('utmp-wtmp.c') |
5c23128d ZJS |
198 | endif |
199 | ||
349cc4a5 | 200 | if conf.get('HAVE_SECCOMP') == 1 |
975464e0 | 201 | shared_sources += files('seccomp-util.c') |
95aac012 | 202 | shared_sources += syscall_list_h |
5c23128d ZJS |
203 | endif |
204 | ||
349cc4a5 | 205 | if conf.get('HAVE_LIBIPTC') == 1 |
31220972 | 206 | shared_sources += files('firewall-util-iptables.c') |
c3045943 MB |
207 | endif |
208 | ||
43b3f0fb | 209 | if conf.get('HAVE_LIBBPF') == 1 |
f1b98127 ZJS |
210 | shared_sources += files( |
211 | 'bpf-link.c', | |
2f492a73 | 212 | ) |
43b3f0fb JK |
213 | endif |
214 | ||
ba323bbe YW |
215 | if conf.get('HAVE_KMOD') == 1 |
216 | shared_sources += files('module-util.c') | |
217 | endif | |
218 | ||
cef9f2a6 | 219 | if conf.get('HAVE_PAM') == 1 |
c5abccfa YW |
220 | shared_sources += files( |
221 | 'pam-util.c', | |
2f492a73 | 222 | ) |
cef9f2a6 LP |
223 | endif |
224 | ||
7e0079f9 ZJS |
225 | if conf.get('ENABLE_NSCD') == 1 |
226 | shared_sources += files('nscd-flush.c') | |
227 | endif | |
228 | ||
38fc5e03 | 229 | if conf.get('HAVE_LIBFIDO2') == 1 and conf.get('HAVE_LIBCRYPTSETUP') == 1 |
0a8e026e PC |
230 | shared_sources += files('cryptsetup-fido2.c') |
231 | endif | |
232 | ||
da96ad5a YW |
233 | generate_ip_protocol_list = find_program('generate-ip-protocol-list.sh') |
234 | ip_protocol_list_txt = custom_target( | |
235 | 'ip-protocol-list.txt', | |
236 | output : 'ip-protocol-list.txt', | |
237 | command : [generate_ip_protocol_list, cpp], | |
7b5e750d YW |
238 | capture : true) |
239 | ||
da96ad5a | 240 | fname = 'ip-protocol-from-name.gperf' |
7b5e750d YW |
241 | gperf_file = custom_target( |
242 | fname, | |
da96ad5a | 243 | input : ip_protocol_list_txt, |
7b5e750d | 244 | output : fname, |
da96ad5a | 245 | command : [generate_gperfs, 'ip_protocol', 'IPPROTO_', '@INPUT@'], |
7b5e750d YW |
246 | capture : true) |
247 | ||
da96ad5a | 248 | fname = 'ip-protocol-from-name.h' |
7b5e750d YW |
249 | target1 = custom_target( |
250 | fname, | |
251 | input : gperf_file, | |
252 | output : fname, | |
253 | command : [gperf, | |
254 | '-L', 'ANSI-C', '-t', '--ignore-case', | |
da96ad5a YW |
255 | '-N', 'lookup_ip_protocol', |
256 | '-H', 'hash_ip_protocol_name', | |
7b5e750d YW |
257 | '-p', '-C', |
258 | '@INPUT@'], | |
259 | capture : true) | |
260 | ||
da96ad5a YW |
261 | fname = 'ip-protocol-to-name.h' |
262 | awkscript = 'ip-protocol-to-name.awk' | |
7b5e750d YW |
263 | target2 = custom_target( |
264 | fname, | |
da96ad5a | 265 | input : [awkscript, ip_protocol_list_txt], |
7b5e750d YW |
266 | output : fname, |
267 | command : [awk, '-f', '@INPUT0@', '@INPUT1@'], | |
268 | capture : true) | |
269 | ||
dca23091 YW |
270 | shared_generated_gperf_headers = [target1, target2] |
271 | shared_sources += shared_generated_gperf_headers | |
7b5e750d | 272 | |
6049ddcc ZJS |
273 | fname = 'ethtool-link-mode.h' |
274 | ethtool_link_mode_h = custom_target( | |
275 | fname, | |
276 | input : ['ethtool-link-mode.py', 'linux/ethtool.h'], | |
277 | output : fname, | |
1e473c2e | 278 | command : [python, '@INPUT0@', '--header', cpp, '@INPUT1@'], |
6049ddcc ZJS |
279 | capture : true) |
280 | shared_sources += ethtool_link_mode_h | |
281 | ||
c18dde32 ZJS |
282 | fname = 'ethtool-link-mode.xml' |
283 | ethtool_link_mode_xml = custom_target( | |
284 | fname, | |
285 | input : ['ethtool-link-mode.py', 'linux/ethtool.h'], | |
286 | output : fname, | |
1e473c2e | 287 | command : [python, '@INPUT0@', '--xml', cpp, '@INPUT1@'], |
c18dde32 ZJS |
288 | capture : true) |
289 | man_page_depends += ethtool_link_mode_xml | |
290 | ||
a2b0cd3f | 291 | libshared_name = 'systemd-shared-@0@'.format(shared_lib_tag) |
5c23128d | 292 | |
4b57a272 | 293 | libshared_deps = [threads, |
4b57a272 | 294 | libacl, |
462255c6 LP |
295 | libblkid, |
296 | libcap, | |
42f3b2f9 | 297 | libcrypt, |
c5fd89ad | 298 | libdl, |
4b57a272 ZJS |
299 | libgcrypt, |
300 | libiptc, | |
3cb9b42a | 301 | libkmod, |
462255c6 | 302 | liblz4, |
77c772f2 | 303 | libmount, |
839fddbe | 304 | libopenssl, |
da035a3a | 305 | libp11kit_cflags, |
cef9f2a6 | 306 | libpam, |
462255c6 | 307 | librt, |
4b57a272 ZJS |
308 | libseccomp, |
309 | libselinux, | |
a2ea44b7 | 310 | libxenctrl, |
ede5a78f | 311 | libxz, |
c47511da ZJS |
312 | libzstd, |
313 | versiondep] | |
4b57a272 | 314 | |
4f5993c3 | 315 | libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir()) |
c18dde32 | 316 | libshared_build_dir = meson.current_build_dir() |
4f5993c3 | 317 | |
2d4ceca8 | 318 | libshared_static = static_library( |
37efbbd8 ZJS |
319 | libshared_name, |
320 | shared_sources, | |
2d4ceca8 | 321 | include_directories : includes, |
92148283 JJ |
322 | dependencies : [libshared_deps, |
323 | userspace], | |
03f7ddf0 ZJS |
324 | c_args : ['-fvisibility=default'], |
325 | build_by_default : false) | |
2d4ceca8 ZJS |
326 | |
327 | libshared = shared_library( | |
328 | libshared_name, | |
37efbbd8 | 329 | include_directories : includes, |
4287c855 | 330 | c_args : ['-fvisibility=default'], |
4f5993c3 | 331 | link_args : ['-shared', |
2d4ceca8 ZJS |
332 | '-Wl,--version-script=' + libshared_sym_path], |
333 | link_whole : [libshared_static, | |
34e221a5 | 334 | libbasic, |
a8e559d4 | 335 | libbasic_gcrypt, |
99b9f8fd | 336 | libsystemd_static], |
92148283 JJ |
337 | dependencies : [libshared_deps, |
338 | userspace], | |
37efbbd8 | 339 | install : true, |
5fb22561 | 340 | install_dir : rootpkglibdir) |
f8cf3d19 LP |
341 | |
342 | shared_fdisk_sources = files( | |
f8cf3d19 LP |
343 | 'fdisk-util.c', |
344 | ) | |
345 | ||
346 | if get_option('fdisk') != 'false' | |
347 | libshared_fdisk = static_library( | |
348 | 'shared-fdisk', | |
349 | shared_fdisk_sources, | |
350 | include_directories : includes, | |
92148283 JJ |
351 | dependencies : [libfdisk, |
352 | userspace], | |
f8cf3d19 LP |
353 | c_args : ['-fvisibility=default'], |
354 | build_by_default : false) | |
355 | endif |