]>
Commit | Line | Data |
---|---|---|
3a726fcd | 1 | # SPDX-License-Identifier: LGPL-2.1+ |
3a726fcd | 2 | |
975464e0 | 3 | shared_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 | |
d284b82b ZJS |
15 | bitmap.c |
16 | bitmap.h | |
17 | blkid-util.h | |
37efbbd8 ZJS |
18 | boot-timestamps.c |
19 | boot-timestamps.h | |
7e87c7d9 ZJS |
20 | bootspec.c |
21 | bootspec.h | |
d284b82b ZJS |
22 | bpf-program.c |
23 | bpf-program.h | |
9f717d42 LP |
24 | bus-unit-procs.c |
25 | bus-unit-procs.h | |
37efbbd8 ZJS |
26 | bus-unit-util.c |
27 | bus-unit-util.h | |
28 | bus-util.c | |
29 | bus-util.h | |
269e4d2d LP |
30 | bus-polkit.c |
31 | bus-polkit.h | |
e45c81b8 LP |
32 | bus-wait-for-jobs.c |
33 | bus-wait-for-jobs.h | |
3572d3df LP |
34 | bus-wait-for-units.c |
35 | bus-wait-for-units.h | |
d284b82b ZJS |
36 | calendarspec.c |
37 | calendarspec.h | |
fdb3deca ZJS |
38 | cgroup-setup.c |
39 | cgroup-setup.h | |
37efbbd8 ZJS |
40 | cgroup-show.c |
41 | cgroup-show.h | |
417a6eec LP |
42 | chown-recursive.c |
43 | chown-recursive.h | |
37efbbd8 ZJS |
44 | clean-ipc.c |
45 | clean-ipc.h | |
d284b82b ZJS |
46 | clock-util.c |
47 | clock-util.h | |
37efbbd8 ZJS |
48 | condition.c |
49 | condition.h | |
50 | conf-parser.c | |
51 | conf-parser.h | |
d284b82b ZJS |
52 | cpu-set-util.c |
53 | cpu-set-util.h | |
54 | crypt-util.c | |
55 | crypt-util.h | |
c157884f | 56 | daemon-util.h |
37efbbd8 ZJS |
57 | dev-setup.c |
58 | dev-setup.h | |
59 | dissect-image.c | |
60 | dissect-image.h | |
a709a315 LP |
61 | dm-util.c |
62 | dm-util.h | |
37efbbd8 ZJS |
63 | dns-domain.c |
64 | dns-domain.h | |
65 | dropin.c | |
66 | dropin.h | |
0bb2f0f1 ZJS |
67 | efi-loader.c |
68 | efi-loader.h | |
a5d8835c | 69 | enable-mempool.c |
686d13b9 LP |
70 | env-file-label.c |
71 | env-file-label.h | |
5c2316c6 YW |
72 | ethtool-util.c |
73 | ethtool-util.h | |
d284b82b ZJS |
74 | exec-util.c |
75 | exec-util.h | |
76 | exit-status.c | |
77 | exit-status.h | |
37efbbd8 ZJS |
78 | fdset.c |
79 | fdset.h | |
d284b82b ZJS |
80 | fileio-label.c |
81 | fileio-label.h | |
c3045943 | 82 | firewall-util.h |
d284b82b ZJS |
83 | format-table.c |
84 | format-table.h | |
b67f05da | 85 | fsck-util.h |
37efbbd8 ZJS |
86 | fstab-util.c |
87 | fstab-util.h | |
37efbbd8 ZJS |
88 | generator.c |
89 | generator.h | |
90 | gpt.h | |
9b2d9078 LP |
91 | group-record-nss.c |
92 | group-record-nss.h | |
295c1a6e LP |
93 | group-record-show.c |
94 | group-record-show.h | |
71d0b9d4 LP |
95 | group-record.c |
96 | group-record.h | |
ff7dad48 ZJS |
97 | id128-print.c |
98 | id128-print.h | |
37efbbd8 ZJS |
99 | ima-util.c |
100 | ima-util.h | |
101 | import-util.c | |
102 | import-util.h | |
103 | initreq.h | |
37efbbd8 ZJS |
104 | install-printf.c |
105 | install-printf.h | |
d68c645b LP |
106 | install.c |
107 | install.h | |
f079c372 LP |
108 | ip-protocol-list.c |
109 | ip-protocol-list.h | |
d284b82b ZJS |
110 | journal-importer.c |
111 | journal-importer.h | |
37efbbd8 ZJS |
112 | journal-util.c |
113 | journal-util.h | |
d284b82b ZJS |
114 | json-internal.h |
115 | json.c | |
116 | json.h | |
42f3b2f9 LP |
117 | libcrypt-util.c |
118 | libcrypt-util.h | |
fb36b133 | 119 | libmount-util.h |
01234e1f YW |
120 | linux/auto_dev-ioctl.h |
121 | linux/bpf.h | |
122 | linux/bpf_common.h | |
123 | linux/bpf_insn.h | |
124 | linux/dm-ioctl.h | |
125 | linux/ethtool.h | |
733cbd00 LP |
126 | local-addresses.c |
127 | local-addresses.h | |
d284b82b ZJS |
128 | lockfile-util.c |
129 | lockfile-util.h | |
e67ae9f5 | 130 | log-link.h |
37efbbd8 ZJS |
131 | logs-show.c |
132 | logs-show.h | |
133 | loop-util.c | |
134 | loop-util.h | |
135 | machine-image.c | |
136 | machine-image.h | |
137 | machine-pool.c | |
138 | machine-pool.h | |
294bf0c3 | 139 | main-func.h |
3cb9b42a | 140 | module-util.h |
77c772f2 ZJS |
141 | mount-util.c |
142 | mount-util.h | |
b355d0c9 LP |
143 | netif-naming-scheme.c |
144 | netif-naming-scheme.h | |
f079c372 LP |
145 | nscd-flush.c |
146 | nscd-flush.h | |
37efbbd8 ZJS |
147 | nsflags.c |
148 | nsflags.h | |
3f637019 | 149 | openssl-util.h |
d284b82b ZJS |
150 | os-util.c |
151 | os-util.h | |
37efbbd8 ZJS |
152 | output-mode.c |
153 | output-mode.h | |
294bf0c3 ZJS |
154 | pager.c |
155 | pager.h | |
37efbbd8 ZJS |
156 | path-lookup.c |
157 | path-lookup.h | |
5e146a75 | 158 | pe-header.h |
839fddbe LP |
159 | pkcs11-util.c |
160 | pkcs11-util.h | |
294bf0c3 ZJS |
161 | pretty-print.c |
162 | pretty-print.h | |
37efbbd8 ZJS |
163 | ptyfwd.c |
164 | ptyfwd.h | |
d284b82b ZJS |
165 | reboot-util.c |
166 | reboot-util.h | |
28937bcc LP |
167 | resize-fs.c |
168 | resize-fs.h | |
37efbbd8 ZJS |
169 | resolve-util.c |
170 | resolve-util.h | |
171 | seccomp-util.h | |
d284b82b ZJS |
172 | securebits-util.c |
173 | securebits-util.h | |
d68c645b LP |
174 | serialize.c |
175 | serialize.h | |
37efbbd8 ZJS |
176 | sleep-config.c |
177 | sleep-config.h | |
5c3fa98d ZJS |
178 | socket-netlink.c |
179 | socket-netlink.h | |
37efbbd8 ZJS |
180 | spawn-ask-password-agent.c |
181 | spawn-ask-password-agent.h | |
182 | spawn-polkit-agent.c | |
183 | spawn-polkit-agent.h | |
184 | specifier.c | |
185 | specifier.h | |
186 | switch-root.c | |
187 | switch-root.h | |
188 | sysctl-util.c | |
189 | sysctl-util.h | |
e4de7287 LP |
190 | tmpfile-util-label.c |
191 | tmpfile-util-label.h | |
ed440f6b SL |
192 | tomoyo-util.c |
193 | tomoyo-util.h | |
b237a168 | 194 | udev-util.c |
d68c645b | 195 | udev-util.h |
37efbbd8 ZJS |
196 | uid-range.c |
197 | uid-range.h | |
5cfa33e0 | 198 | unit-file.c |
dfadc1f2 | 199 | unit-file.h |
9b2d9078 LP |
200 | user-record-nss.c |
201 | user-record-nss.h | |
295c1a6e LP |
202 | user-record-show.c |
203 | user-record-show.h | |
71d0b9d4 LP |
204 | user-record.c |
205 | user-record.h | |
ec8e4a0e LP |
206 | userdb.c |
207 | userdb.h | |
37efbbd8 | 208 | utmp-wtmp.h |
d41bd96f LP |
209 | varlink.c |
210 | varlink.h | |
d284b82b ZJS |
211 | verbs.c |
212 | verbs.h | |
37efbbd8 ZJS |
213 | vlan-util.c |
214 | vlan-util.h | |
215 | volatile-util.c | |
216 | volatile-util.h | |
217 | watchdog.c | |
218 | watchdog.h | |
d284b82b ZJS |
219 | web-util.c |
220 | web-util.h | |
b492aea0 ZJS |
221 | wifi-util.c |
222 | wifi-util.h | |
d284b82b ZJS |
223 | xml.c |
224 | xml.h | |
975464e0 | 225 | '''.split()) |
5c23128d | 226 | |
b9fa9b71 MO |
227 | if get_option('tests') != 'false' |
228 | shared_sources += files('tests.c', 'tests.h') | |
229 | endif | |
230 | ||
69e96427 | 231 | test_tables_h = files('test-tables.h') |
5a8b1640 | 232 | shared_sources += test_tables_h |
69e96427 | 233 | |
349cc4a5 | 234 | if conf.get('HAVE_ACL') == 1 |
975464e0 | 235 | shared_sources += files('acl-util.c') |
5c23128d ZJS |
236 | endif |
237 | ||
3211da4b | 238 | if conf.get('ENABLE_UTMP') == 1 |
975464e0 | 239 | shared_sources += files('utmp-wtmp.c') |
5c23128d ZJS |
240 | endif |
241 | ||
349cc4a5 | 242 | if conf.get('HAVE_SECCOMP') == 1 |
975464e0 | 243 | shared_sources += files('seccomp-util.c') |
5c23128d ZJS |
244 | endif |
245 | ||
349cc4a5 | 246 | if conf.get('HAVE_LIBIPTC') == 1 |
975464e0 | 247 | shared_sources += files('firewall-util.c') |
c3045943 MB |
248 | endif |
249 | ||
ba323bbe YW |
250 | if conf.get('HAVE_KMOD') == 1 |
251 | shared_sources += files('module-util.c') | |
252 | endif | |
253 | ||
cef9f2a6 LP |
254 | if conf.get('HAVE_PAM') == 1 |
255 | shared_sources += files(''' | |
256 | pam-util.c | |
257 | pam-util.h | |
258 | '''.split()) | |
259 | endif | |
260 | ||
da96ad5a YW |
261 | generate_ip_protocol_list = find_program('generate-ip-protocol-list.sh') |
262 | ip_protocol_list_txt = custom_target( | |
263 | 'ip-protocol-list.txt', | |
264 | output : 'ip-protocol-list.txt', | |
265 | command : [generate_ip_protocol_list, cpp], | |
7b5e750d YW |
266 | capture : true) |
267 | ||
da96ad5a | 268 | fname = 'ip-protocol-from-name.gperf' |
7b5e750d YW |
269 | gperf_file = custom_target( |
270 | fname, | |
da96ad5a | 271 | input : ip_protocol_list_txt, |
7b5e750d | 272 | output : fname, |
da96ad5a | 273 | command : [generate_gperfs, 'ip_protocol', 'IPPROTO_', '@INPUT@'], |
7b5e750d YW |
274 | capture : true) |
275 | ||
da96ad5a | 276 | fname = 'ip-protocol-from-name.h' |
7b5e750d YW |
277 | target1 = custom_target( |
278 | fname, | |
279 | input : gperf_file, | |
280 | output : fname, | |
281 | command : [gperf, | |
282 | '-L', 'ANSI-C', '-t', '--ignore-case', | |
da96ad5a YW |
283 | '-N', 'lookup_ip_protocol', |
284 | '-H', 'hash_ip_protocol_name', | |
7b5e750d YW |
285 | '-p', '-C', |
286 | '@INPUT@'], | |
287 | capture : true) | |
288 | ||
da96ad5a YW |
289 | fname = 'ip-protocol-to-name.h' |
290 | awkscript = 'ip-protocol-to-name.awk' | |
7b5e750d YW |
291 | target2 = custom_target( |
292 | fname, | |
da96ad5a | 293 | input : [awkscript, ip_protocol_list_txt], |
7b5e750d YW |
294 | output : fname, |
295 | command : [awk, '-f', '@INPUT0@', '@INPUT1@'], | |
296 | capture : true) | |
297 | ||
dca23091 YW |
298 | shared_generated_gperf_headers = [target1, target2] |
299 | shared_sources += shared_generated_gperf_headers | |
7b5e750d | 300 | |
5c23128d ZJS |
301 | libshared_name = 'systemd-shared-@0@'.format(meson.project_version()) |
302 | ||
4b57a272 | 303 | libshared_deps = [threads, |
4b57a272 | 304 | libacl, |
462255c6 LP |
305 | libblkid, |
306 | libcap, | |
42f3b2f9 | 307 | libcrypt, |
4b57a272 ZJS |
308 | libcryptsetup, |
309 | libgcrypt, | |
462255c6 | 310 | libidn, |
4b57a272 | 311 | libiptc, |
3cb9b42a | 312 | libkmod, |
462255c6 | 313 | liblz4, |
77c772f2 | 314 | libmount, |
839fddbe LP |
315 | libopenssl, |
316 | libp11kit, | |
cef9f2a6 | 317 | libpam, |
462255c6 | 318 | librt, |
4b57a272 ZJS |
319 | libseccomp, |
320 | libselinux, | |
462255c6 | 321 | libxz] |
4b57a272 | 322 | |
4f5993c3 FS |
323 | libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir()) |
324 | ||
2d4ceca8 | 325 | libshared_static = static_library( |
37efbbd8 ZJS |
326 | libshared_name, |
327 | shared_sources, | |
2d4ceca8 ZJS |
328 | include_directories : includes, |
329 | dependencies : libshared_deps, | |
330 | c_args : ['-fvisibility=default']) | |
331 | ||
332 | libshared = shared_library( | |
333 | libshared_name, | |
8e899a92 | 334 | libudev_sources, |
37efbbd8 | 335 | include_directories : includes, |
4f5993c3 | 336 | link_args : ['-shared', |
2d4ceca8 ZJS |
337 | '-Wl,--version-script=' + libshared_sym_path], |
338 | link_whole : [libshared_static, | |
34e221a5 | 339 | libbasic, |
a8e559d4 | 340 | libbasic_gcrypt, |
5e3cec87 ZJS |
341 | libsystemd_static, |
342 | libjournal_client], | |
37efbbd8 | 343 | c_args : ['-fvisibility=default'], |
4b57a272 | 344 | dependencies : libshared_deps, |
37efbbd8 ZJS |
345 | install : true, |
346 | install_dir : rootlibexecdir) |