]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/meson.build
Merge pull request #7042 from vcaputo/iteratedcache
[thirdparty/systemd.git] / src / shared / meson.build
1 # SPDX-License-Identifier: LGPL-2.1+
2 #
3 # Copyright 2017 Zbigniew Jędrzejewski-Szmek
4 #
5 # systemd is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as published by
7 # the Free Software Foundation; either version 2.1 of the License, or
8 # (at your option) any later version.
9 #
10 # systemd is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
14 #
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with systemd; If not, see <http://www.gnu.org/licenses/>.
17
18 shared_sources = '''
19 acl-util.h
20 acpi-fpdt.c
21 acpi-fpdt.h
22 apparmor-util.c
23 apparmor-util.h
24 ask-password-api.c
25 ask-password-api.h
26 base-filesystem.c
27 base-filesystem.h
28 boot-timestamps.c
29 boot-timestamps.h
30 bootspec.c
31 bootspec.h
32 bus-unit-util.c
33 bus-unit-util.h
34 bus-util.c
35 bus-util.h
36 cgroup-show.c
37 cgroup-show.h
38 clean-ipc.c
39 clean-ipc.h
40 condition.c
41 condition.h
42 conf-parser.c
43 conf-parser.h
44 dev-setup.c
45 dev-setup.h
46 dissect-image.c
47 dissect-image.h
48 dns-domain.c
49 dns-domain.h
50 dropin.c
51 dropin.h
52 efivars.c
53 efivars.h
54 fdset.c
55 fdset.h
56 firewall-util.h
57 fstab-util.c
58 fstab-util.h
59 generator.c
60 generator.h
61 gpt.h
62 ima-util.c
63 ima-util.h
64 import-util.c
65 import-util.h
66 initreq.h
67 install.c
68 install.h
69 install-printf.c
70 install-printf.h
71 journal-util.c
72 journal-util.h
73 logs-show.c
74 logs-show.h
75 loop-util.c
76 loop-util.h
77 machine-image.c
78 machine-image.h
79 machine-pool.c
80 machine-pool.h
81 nsflags.c
82 nsflags.h
83 output-mode.c
84 output-mode.h
85 pager.c
86 pager.h
87 path-lookup.c
88 path-lookup.h
89 ptyfwd.c
90 ptyfwd.h
91 resolve-util.c
92 resolve-util.h
93 seccomp-util.h
94 sleep-config.c
95 sleep-config.h
96 spawn-ask-password-agent.c
97 spawn-ask-password-agent.h
98 spawn-polkit-agent.c
99 spawn-polkit-agent.h
100 specifier.c
101 specifier.h
102 switch-root.c
103 switch-root.h
104 sysctl-util.c
105 sysctl-util.h
106 tests.c
107 tests.h
108 tomoyo-util.c
109 tomoyo-util.h
110 udev-util.h
111 udev-util.c
112 uid-range.c
113 uid-range.h
114 utmp-wtmp.h
115 vlan-util.c
116 vlan-util.h
117 volatile-util.c
118 volatile-util.h
119 watchdog.c
120 watchdog.h
121 wireguard-netlink.h
122 '''.split()
123
124 test_tables_h = files('test-tables.h')
125 shared_sources += [test_tables_h]
126
127 if conf.get('HAVE_ACL') == 1
128 shared_sources += ['acl-util.c']
129 endif
130
131 if conf.get('ENABLE_UTMP') == 1
132 shared_sources += ['utmp-wtmp.c']
133 endif
134
135 if conf.get('HAVE_SECCOMP') == 1
136 shared_sources += ['seccomp-util.c']
137 endif
138
139 if conf.get('HAVE_LIBIPTC') == 1
140 shared_sources += ['firewall-util.c']
141 endif
142
143 libshared_name = 'systemd-shared-@0@'.format(meson.project_version())
144
145 libshared_deps = [threads,
146 librt,
147 libcap,
148 libacl,
149 libcryptsetup,
150 libgcrypt,
151 libiptc,
152 libseccomp,
153 libselinux,
154 libidn,
155 libxz,
156 liblz4,
157 libblkid]
158
159 libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir())
160
161 libshared_static = static_library(
162 libshared_name,
163 shared_sources,
164 include_directories : includes,
165 dependencies : libshared_deps,
166 c_args : ['-fvisibility=default'])
167
168 libshared = shared_library(
169 libshared_name,
170 libudev_sources,
171 include_directories : includes,
172 link_args : ['-shared',
173 '-Wl,--version-script=' + libshared_sym_path],
174 link_whole : [libshared_static,
175 libbasic,
176 libbasic_gcrypt,
177 libsystemd_static,
178 libjournal_client],
179 c_args : ['-fvisibility=default'],
180 dependencies : libshared_deps,
181 install : true,
182 install_dir : rootlibexecdir)