]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/shared/meson.build
Merge pull request #9760 from yuwata/resolve-etc-hosts-cleanup
[thirdparty/systemd.git] / src / shared / meson.build
CommitLineData
3a726fcd 1# SPDX-License-Identifier: LGPL-2.1+
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
11 base-filesystem.c
12 base-filesystem.h
13 boot-timestamps.c
14 boot-timestamps.h
7e87c7d9
ZJS
15 bootspec.c
16 bootspec.h
37efbbd8
ZJS
17 bus-unit-util.c
18 bus-unit-util.h
19 bus-util.c
20 bus-util.h
21 cgroup-show.c
22 cgroup-show.h
23 clean-ipc.c
24 clean-ipc.h
25 condition.c
26 condition.h
27 conf-parser.c
28 conf-parser.h
29 dev-setup.c
30 dev-setup.h
31 dissect-image.c
32 dissect-image.h
33 dns-domain.c
34 dns-domain.h
35 dropin.c
36 dropin.h
37 efivars.c
38 efivars.h
39 fdset.c
40 fdset.h
c3045943 41 firewall-util.h
37efbbd8
ZJS
42 fstab-util.c
43 fstab-util.h
37efbbd8
ZJS
44 generator.c
45 generator.h
46 gpt.h
47 ima-util.c
48 ima-util.h
49 import-util.c
50 import-util.h
51 initreq.h
52 install.c
53 install.h
54 install-printf.c
55 install-printf.h
56 journal-util.c
57 journal-util.h
58 logs-show.c
59 logs-show.h
60 loop-util.c
61 loop-util.h
62 machine-image.c
63 machine-image.h
64 machine-pool.c
65 machine-pool.h
3cb9b42a 66 module-util.h
37efbbd8
ZJS
67 nsflags.c
68 nsflags.h
69 output-mode.c
70 output-mode.h
37efbbd8
ZJS
71 path-lookup.c
72 path-lookup.h
73 ptyfwd.c
74 ptyfwd.h
75 resolve-util.c
76 resolve-util.h
77 seccomp-util.h
78 sleep-config.c
79 sleep-config.h
80 spawn-ask-password-agent.c
81 spawn-ask-password-agent.h
82 spawn-polkit-agent.c
83 spawn-polkit-agent.h
84 specifier.c
85 specifier.h
86 switch-root.c
87 switch-root.h
88 sysctl-util.c
89 sysctl-util.h
90 tests.c
91 tests.h
ed440f6b
SL
92 tomoyo-util.c
93 tomoyo-util.h
37efbbd8 94 udev-util.h
b237a168 95 udev-util.c
37efbbd8
ZJS
96 uid-range.c
97 uid-range.h
98 utmp-wtmp.h
99 vlan-util.c
100 vlan-util.h
101 volatile-util.c
102 volatile-util.h
103 watchdog.c
104 watchdog.h
e5719363 105 wireguard-netlink.h
975464e0 106'''.split())
5c23128d 107
69e96427
ZJS
108test_tables_h = files('test-tables.h')
109shared_sources += [test_tables_h]
110
349cc4a5 111if conf.get('HAVE_ACL') == 1
975464e0 112 shared_sources += files('acl-util.c')
5c23128d
ZJS
113endif
114
3211da4b 115if conf.get('ENABLE_UTMP') == 1
975464e0 116 shared_sources += files('utmp-wtmp.c')
5c23128d
ZJS
117endif
118
349cc4a5 119if conf.get('HAVE_SECCOMP') == 1
975464e0 120 shared_sources += files('seccomp-util.c')
5c23128d
ZJS
121endif
122
349cc4a5 123if conf.get('HAVE_LIBIPTC') == 1
975464e0 124 shared_sources += files('firewall-util.c')
c3045943
MB
125endif
126
ba323bbe
YW
127if conf.get('HAVE_KMOD') == 1
128 shared_sources += files('module-util.c')
129endif
130
5c23128d
ZJS
131libshared_name = 'systemd-shared-@0@'.format(meson.project_version())
132
4b57a272
ZJS
133libshared_deps = [threads,
134 librt,
135 libcap,
136 libacl,
137 libcryptsetup,
138 libgcrypt,
139 libiptc,
3cb9b42a 140 libkmod,
4b57a272
ZJS
141 libseccomp,
142 libselinux,
143 libidn,
144 libxz,
145 liblz4,
146 libblkid]
147
4f5993c3
FS
148libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir())
149
2d4ceca8 150libshared_static = static_library(
37efbbd8
ZJS
151 libshared_name,
152 shared_sources,
2d4ceca8
ZJS
153 include_directories : includes,
154 dependencies : libshared_deps,
155 c_args : ['-fvisibility=default'])
156
157libshared = shared_library(
158 libshared_name,
8e899a92 159 libudev_sources,
37efbbd8 160 include_directories : includes,
4f5993c3 161 link_args : ['-shared',
2d4ceca8
ZJS
162 '-Wl,--version-script=' + libshared_sym_path],
163 link_whole : [libshared_static,
34e221a5 164 libbasic,
a8e559d4 165 libbasic_gcrypt,
5e3cec87
ZJS
166 libsystemd_static,
167 libjournal_client],
37efbbd8 168 c_args : ['-fvisibility=default'],
4b57a272 169 dependencies : libshared_deps,
37efbbd8
ZJS
170 install : true,
171 install_dir : rootlibexecdir)