]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/meson.build
Merge pull request #9500 from zsol/append
[thirdparty/systemd.git] / src / shared / meson.build
1 # SPDX-License-Identifier: LGPL-2.1+
2
3 shared_sources = files('''
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
15 bootspec.c
16 bootspec.h
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
41 firewall-util.h
42 fstab-util.c
43 fstab-util.h
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
66 module-util.h
67 module-util.c
68 nsflags.c
69 nsflags.h
70 output-mode.c
71 output-mode.h
72 path-lookup.c
73 path-lookup.h
74 ptyfwd.c
75 ptyfwd.h
76 resolve-util.c
77 resolve-util.h
78 seccomp-util.h
79 sleep-config.c
80 sleep-config.h
81 spawn-ask-password-agent.c
82 spawn-ask-password-agent.h
83 spawn-polkit-agent.c
84 spawn-polkit-agent.h
85 specifier.c
86 specifier.h
87 switch-root.c
88 switch-root.h
89 sysctl-util.c
90 sysctl-util.h
91 tests.c
92 tests.h
93 tomoyo-util.c
94 tomoyo-util.h
95 udev-util.h
96 udev-util.c
97 uid-range.c
98 uid-range.h
99 utmp-wtmp.h
100 vlan-util.c
101 vlan-util.h
102 volatile-util.c
103 volatile-util.h
104 watchdog.c
105 watchdog.h
106 wireguard-netlink.h
107 '''.split())
108
109 test_tables_h = files('test-tables.h')
110 shared_sources += [test_tables_h]
111
112 if conf.get('HAVE_ACL') == 1
113 shared_sources += files('acl-util.c')
114 endif
115
116 if conf.get('ENABLE_UTMP') == 1
117 shared_sources += files('utmp-wtmp.c')
118 endif
119
120 if conf.get('HAVE_SECCOMP') == 1
121 shared_sources += files('seccomp-util.c')
122 endif
123
124 if conf.get('HAVE_LIBIPTC') == 1
125 shared_sources += files('firewall-util.c')
126 endif
127
128 libshared_name = 'systemd-shared-@0@'.format(meson.project_version())
129
130 libshared_deps = [threads,
131 librt,
132 libcap,
133 libacl,
134 libcryptsetup,
135 libgcrypt,
136 libiptc,
137 libkmod,
138 libseccomp,
139 libselinux,
140 libidn,
141 libxz,
142 liblz4,
143 libblkid]
144
145 libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir())
146
147 libshared_static = static_library(
148 libshared_name,
149 shared_sources,
150 include_directories : includes,
151 dependencies : libshared_deps,
152 c_args : ['-fvisibility=default'])
153
154 libshared = shared_library(
155 libshared_name,
156 libudev_sources,
157 include_directories : includes,
158 link_args : ['-shared',
159 '-Wl,--version-script=' + libshared_sym_path],
160 link_whole : [libshared_static,
161 libbasic,
162 libbasic_gcrypt,
163 libsystemd_static,
164 libjournal_client],
165 c_args : ['-fvisibility=default'],
166 dependencies : libshared_deps,
167 install : true,
168 install_dir : rootlibexecdir)