chiark / gitweb /
2c70bfd41ce0fc67304f05df9727160069e764a6
[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 #         wireguard-netlink.h
125 # '''.split()
126 #else
127 shared_sources = '''
128         bus-util.c
129         bus-util.h
130         clean-ipc.c
131         clean-ipc.h
132         conf-parser.c
133         conf-parser.h
134         musl_missing.c
135         musl_missing.h
136         nsflags.c
137         nsflags.h
138         output-mode.c
139         output-mode.h
140         pager.c
141         pager.h
142         sleep-config.c
143         sleep-config.h
144         spawn-polkit-agent.c
145         spawn-polkit-agent.h
146         udev-util.c
147         udev-util.h
148 '''.split()
149 #endif // 0
150
151 test_tables_h = files('test-tables.h')
152 shared_sources += [test_tables_h]
153
154 if conf.get('HAVE_ACL') == 1
155         shared_sources += ['acl-util.c']
156 endif
157
158 if conf.get('ENABLE_UTMP') == 1
159         shared_sources += ['utmp-wtmp.c']
160 endif
161
162 #if 0 /// UNNEEDED by elogind
163 # if conf.get('HAVE_SECCOMP') == 1
164 #         shared_sources += ['seccomp-util.c']
165 # endif
166
167 # if conf.get('HAVE_LIBIPTC') == 1
168 #         shared_sources += ['firewall-util.c']
169 # endif
170 #endif // 0
171
172 libshared_name = 'elogind-shared-@0@'.format(meson.project_version())
173
174 #if 0 /// elogind doesn't need all this
175 # libshared_deps = [threads,
176 #                   librt,
177 #                   libcap,
178 #                   libacl,
179 #                   libcryptsetup,
180 #                   libgcrypt,
181 #                   libiptc,
182 #                   libseccomp,
183 #                   libselinux,
184 #                   libidn,
185 #                   libxz,
186 #                   liblz4,
187 #                   libblkid]
188 #else
189 libshared_deps = [threads,
190                   libacl,
191                   libcap,
192                   libselinux]
193 #endif // 0
194
195 libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir())
196
197 libshared = shared_library(
198         libshared_name,
199         shared_sources,
200         basic_sources,
201         journal_internal_sources,
202         libelogind_internal_sources,
203 #if 0 /// UNNEEDED by elogind
204 #         libudev_sources,
205 #         include_directories : includes,
206 #         link_args : ['-shared',
207 #                     '-Wl,--version-script=' + libshared_sym_path],
208 #         c_args : ['-fvisibility=default'],
209 #         dependencies : libshared_deps,
210 #         install : true,
211 #         install_dir : rootlibexecdir)
212
213 # libshared_static = static_library(
214 #         libshared_name,
215 #         shared_sources,
216 #         basic_sources,
217 #         include_directories : includes,
218 #         dependencies : libshared_deps)
219 #else
220         libelogind_internal_sources,
221 #endif // 0
222 #if 1 /// need elogind internal library sources
223         libelogind_internal_sources,
224 #endif // 1