chiark / gitweb /
Prep v236 : Add missing SPDX-License-Identifier (6/9) src/shared
[elogind.git] / src / shared / meson.build
1 # SPDX-License-Identifier: LGPL-2.1+
2 #
3 # Copyright 2017 Zbigniew JÄ™drzejewski-Szmek
4 #
5 # elogind 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 # elogind 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 elogind; If not, see <http://www.gnu.org/licenses/>.
17
18 #if 0 /// elogind has a much shorter list
19 # shared_sources = '''
20 #         acl-util.h
21 #         acpi-fpdt.c
22 #         acpi-fpdt.h
23 #         apparmor-util.c
24 #         apparmor-util.h
25 #         ask-password-api.c
26 #         ask-password-api.h
27 #         base-filesystem.c
28 #         base-filesystem.h
29 #         boot-timestamps.c
30 #         boot-timestamps.h
31 #         bootspec.c
32 #         bootspec.h
33 #         bus-unit-util.c
34 #         bus-unit-util.h
35 #         bus-util.c
36 #         bus-util.h
37 #         cgroup-show.c
38 #         cgroup-show.h
39 #         clean-ipc.c
40 #         clean-ipc.h
41 #         condition.c
42 #         condition.h
43 #         conf-parser.c
44 #         conf-parser.h
45 #         dev-setup.c
46 #         dev-setup.h
47 #         dissect-image.c
48 #         dissect-image.h
49 #         dns-domain.c
50 #         dns-domain.h
51 #         dropin.c
52 #         dropin.h
53 #         efivars.c
54 #         efivars.h
55 #         fdset.c
56 #         fdset.h
57 #         firewall-util.h
58 #         fstab-util.c
59 #         fstab-util.h
60 #         gcrypt-util.c
61 #         gcrypt-util.h
62 #         generator.c
63 #         generator.h
64 #         gpt.h
65 #         ima-util.c
66 #         ima-util.h
67 #         import-util.c
68 #         import-util.h
69 #         initreq.h
70 #         install.c
71 #         install.h
72 #         install-printf.c
73 #         install-printf.h
74 #         journal-util.c
75 #         journal-util.h
76 #         logs-show.c
77 #         logs-show.h
78 #         loop-util.c
79 #         loop-util.h
80 #         machine-image.c
81 #         machine-image.h
82 #         machine-pool.c
83 #         machine-pool.h
84 #         nsflags.c
85 #         nsflags.h
86 #         output-mode.c
87 #         output-mode.h
88 #         pager.c
89 #         pager.h
90 #         path-lookup.c
91 #         path-lookup.h
92 #         ptyfwd.c
93 #         ptyfwd.h
94 #         resolve-util.c
95 #         resolve-util.h
96 #         seccomp-util.h
97 #         sleep-config.c
98 #         sleep-config.h
99 #         spawn-ask-password-agent.c
100 #         spawn-ask-password-agent.h
101 #         spawn-polkit-agent.c
102 #         spawn-polkit-agent.h
103 #         specifier.c
104 #         specifier.h
105 #         switch-root.c
106 #         switch-root.h
107 #         sysctl-util.c
108 #         sysctl-util.h
109 #         tests.c
110 #         tests.h
111 #         tomoyo-util.c
112 #         tomoyo-util.h
113 #         udev-util.h
114 #         udev-util.c
115 #         uid-range.c
116 #         uid-range.h
117 #         utmp-wtmp.h
118 #         vlan-util.c
119 #         vlan-util.h
120 #         volatile-util.c
121 #         volatile-util.h
122 #         watchdog.c
123 #         watchdog.h
124 # '''.split()
125 #else
126 shared_sources = '''
127         bus-util.c
128         bus-util.h
129         clean-ipc.c
130         clean-ipc.h
131         conf-parser.c
132         conf-parser.h
133         musl_missing.c
134         musl_missing.h
135         nsflags.c
136         nsflags.h
137         output-mode.c
138         output-mode.h
139         pager.c
140         pager.h
141         sleep-config.c
142         sleep-config.h
143         spawn-polkit-agent.c
144         spawn-polkit-agent.h
145         udev-util.c
146         udev-util.h
147 '''.split()
148 #endif // 0
149
150 test_tables_h = files('test-tables.h')
151 shared_sources += [test_tables_h]
152
153 if conf.get('HAVE_ACL') == 1
154         shared_sources += ['acl-util.c']
155 endif
156
157 if conf.get('ENABLE_UTMP') == 1
158         shared_sources += ['utmp-wtmp.c']
159 endif
160
161 #if 0 /// UNNEEDED by elogind
162 # if conf.get('HAVE_SECCOMP') == 1
163 #         shared_sources += ['seccomp-util.c']
164 # endif
165
166 # if conf.get('HAVE_LIBIPTC') == 1
167 #         shared_sources += ['firewall-util.c']
168 # endif
169 #endif // 0
170
171 libshared_name = 'elogind-shared-@0@'.format(meson.project_version())
172
173 #if 0 /// elogind doesn't need all this
174 # libshared_deps = [threads,
175 #                   librt,
176 #                   libcap,
177 #                   libacl,
178 #                   libcryptsetup,
179 #                   libgcrypt,
180 #                   libiptc,
181 #                   libseccomp,
182 #                   libselinux,
183 #                   libidn,
184 #                   libxz,
185 #                   liblz4,
186 #                   libblkid]
187 #else
188 libshared_deps = [threads,
189                   libacl,
190                   libcap,
191                   libselinux]
192 #endif // 0
193
194 libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir())
195
196 libshared = shared_library(
197         libshared_name,
198         shared_sources,
199         basic_sources,
200 #if 0 /// UNNEEDED by elogind
201 #         journal_internal_sources,
202 #         libsystemd_internal_sources,
203 #         libudev_sources,
204 #else
205         libelogind_internal_sources,
206 #endif // 0
207         include_directories : includes,
208         link_args : ['-shared',
209                     '-Wl,--version-script=' + libshared_sym_path],
210         c_args : ['-fvisibility=default'],
211         dependencies : libshared_deps,
212         install : true,
213         install_dir : rootlibexecdir)
214
215 libshared_static = static_library(
216         libshared_name,
217         shared_sources,
218         basic_sources,
219 #if 1 /// need elogind internal library sources
220         libelogind_internal_sources,
221 #endif // 1
222         include_directories : includes,
223         dependencies : libshared_deps)