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