]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/meson.build
Merge pull request #6910 from ssahani/issue-6359
[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 gcrypt-util.c
60 gcrypt-util.h
61 generator.c
62 generator.h
63 gpt.h
64 ima-util.c
65 ima-util.h
66 import-util.c
67 import-util.h
68 initreq.h
69 install.c
70 install.h
71 install-printf.c
72 install-printf.h
73 journal-util.c
74 journal-util.h
75 logs-show.c
76 logs-show.h
77 loop-util.c
78 loop-util.h
79 machine-image.c
80 machine-image.h
81 machine-pool.c
82 machine-pool.h
83 nsflags.c
84 nsflags.h
85 output-mode.c
86 output-mode.h
87 pager.c
88 pager.h
89 path-lookup.c
90 path-lookup.h
91 ptyfwd.c
92 ptyfwd.h
93 resolve-util.c
94 resolve-util.h
95 seccomp-util.h
96 sleep-config.c
97 sleep-config.h
98 spawn-ask-password-agent.c
99 spawn-ask-password-agent.h
100 spawn-polkit-agent.c
101 spawn-polkit-agent.h
102 specifier.c
103 specifier.h
104 switch-root.c
105 switch-root.h
106 sysctl-util.c
107 sysctl-util.h
108 tests.c
109 tests.h
110 tomoyo-util.c
111 tomoyo-util.h
112 udev-util.h
113 udev-util.c
114 uid-range.c
115 uid-range.h
116 utmp-wtmp.h
117 vlan-util.c
118 vlan-util.h
119 volatile-util.c
120 volatile-util.h
121 watchdog.c
122 watchdog.h
123 '''.split()
124
125 test_tables_h = files('test-tables.h')
126 shared_sources += [test_tables_h]
127
128 if conf.get('HAVE_ACL') == 1
129 shared_sources += ['acl-util.c']
130 endif
131
132 if conf.get('ENABLE_UTMP') == 1
133 shared_sources += ['utmp-wtmp.c']
134 endif
135
136 if conf.get('HAVE_SECCOMP') == 1
137 shared_sources += ['seccomp-util.c']
138 endif
139
140 if conf.get('HAVE_LIBIPTC') == 1
141 shared_sources += ['firewall-util.c']
142 endif
143
144 libshared_name = 'systemd-shared-@0@'.format(meson.project_version())
145
146 libshared_deps = [threads,
147 librt,
148 libcap,
149 libacl,
150 libcryptsetup,
151 libgcrypt,
152 libiptc,
153 libseccomp,
154 libselinux,
155 libidn,
156 libxz,
157 liblz4,
158 libblkid]
159
160 libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir())
161
162 libshared = shared_library(
163 libshared_name,
164 shared_sources,
165 basic_sources,
166 journal_internal_sources,
167 libsystemd_internal_sources,
168 libudev_sources,
169 include_directories : includes,
170 link_args : ['-shared',
171 '-Wl,--version-script=' + libshared_sym_path],
172 c_args : ['-fvisibility=default'],
173 dependencies : libshared_deps,
174 install : true,
175 install_dir : rootlibexecdir)
176
177 libshared_static = static_library(
178 libshared_name,
179 shared_sources,
180 basic_sources,
181 include_directories : includes,
182 dependencies : libshared_deps)