]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/meson.build
Merge pull request #7793 from rojkov/fix-6456
[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 '''.split()
122
123 test_tables_h = files('test-tables.h')
124 shared_sources += [test_tables_h]
125
126 if conf.get('HAVE_ACL') == 1
127 shared_sources += ['acl-util.c']
128 endif
129
130 if conf.get('ENABLE_UTMP') == 1
131 shared_sources += ['utmp-wtmp.c']
132 endif
133
134 if conf.get('HAVE_SECCOMP') == 1
135 shared_sources += ['seccomp-util.c']
136 endif
137
138 if conf.get('HAVE_LIBIPTC') == 1
139 shared_sources += ['firewall-util.c']
140 endif
141
142 libshared_name = 'systemd-shared-@0@'.format(meson.project_version())
143
144 libshared_deps = [threads,
145 librt,
146 libcap,
147 libacl,
148 libcryptsetup,
149 libgcrypt,
150 libiptc,
151 libseccomp,
152 libselinux,
153 libidn,
154 libxz,
155 liblz4,
156 libblkid]
157
158 libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir())
159
160 libshared_static = static_library(
161 libshared_name,
162 shared_sources,
163 include_directories : includes,
164 dependencies : libshared_deps,
165 c_args : ['-fvisibility=default'])
166
167 libshared = shared_library(
168 libshared_name,
169 libudev_sources,
170 include_directories : includes,
171 link_args : ['-shared',
172 '-Wl,--version-script=' + libshared_sym_path],
173 link_whole : [libshared_static,
174 libbasic,
175 libbasic_gcrypt,
176 libsystemd_static,
177 libjournal_client],
178 c_args : ['-fvisibility=default'],
179 dependencies : libshared_deps,
180 install : true,
181 install_dir : rootlibexecdir)