chiark / gitweb /
tree-wide: beautify remaining copyright statements
[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 = files('''
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 #         path-lookup.c
74 #         path-lookup.h
75 #         ptyfwd.c
76 #         ptyfwd.h
77 #         resolve-util.c
78 #         resolve-util.h
79 #         seccomp-util.h
80 #         sleep-config.c
81 #         sleep-config.h
82 #         spawn-ask-password-agent.c
83 #         spawn-ask-password-agent.h
84 #         spawn-polkit-agent.c
85 #         spawn-polkit-agent.h
86 #         specifier.c
87 #         specifier.h
88 #         switch-root.c
89 #         switch-root.h
90 #         sysctl-util.c
91 #         sysctl-util.h
92 #         tests.c
93 #         tests.h
94 #         tomoyo-util.c
95 #         tomoyo-util.h
96 #         udev-util.h
97 #         udev-util.c
98 #         uid-range.c
99 #         uid-range.h
100 #         utmp-wtmp.h
101 #         vlan-util.c
102 #         vlan-util.h
103 #         volatile-util.c
104 #         volatile-util.h
105 #         watchdog.c
106 #         watchdog.h
107 #         wireguard-netlink.h
108 # '''.split())
109 #else
110 shared_sources = '''
111         bus-util.c
112         bus-util.h
113         clean-ipc.c
114         clean-ipc.h
115         conf-parser.c
116         conf-parser.h
117         musl_missing.c
118         musl_missing.h
119         nsflags.c
120         nsflags.h
121         output-mode.c
122         output-mode.h
123         pager.c
124         pager.h
125         sleep-config.c
126         sleep-config.h
127         spawn-polkit-agent.c
128         spawn-polkit-agent.h
129         udev-util.c
130         udev-util.h
131 '''.split()
132 #endif // 0
133
134 test_tables_h = files('test-tables.h')
135 shared_sources += [test_tables_h]
136
137 if conf.get('HAVE_ACL') == 1
138         shared_sources += files('acl-util.c')
139 endif
140
141 if conf.get('ENABLE_UTMP') == 1
142         shared_sources += files('utmp-wtmp.c')
143 endif
144
145 #if 0 /// UNNEEDED by elogind
146 # if conf.get('HAVE_SECCOMP') == 1
147 #         shared_sources += files('seccomp-util.c')
148 # endif
149
150 # if conf.get('HAVE_LIBIPTC') == 1
151 #         shared_sources += files('firewall-util.c')
152 # endif
153 #endif // 0
154
155 libshared_name = 'elogind-shared-@0@'.format(meson.project_version())
156
157 #if 0 /// elogind doesn't need all this
158 # libshared_deps = [threads,
159 #                   librt,
160 #                   libcap,
161 #                   libacl,
162 #                   libcryptsetup,
163 #                   libgcrypt,
164 #                   libiptc,
165 #                   libseccomp,
166 #                   libselinux,
167 #                   libidn,
168 #                   libxz,
169 #                   liblz4,
170 #                   libblkid]
171 #else
172 libshared_deps = [threads,
173                   libacl,
174                   libcap,
175                   libselinux]
176 #endif // 0
177
178 libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir())
179
180 libshared_static = static_library(
181         libshared_name,
182         shared_sources,
183         include_directories : includes,
184         dependencies : libshared_deps,
185         c_args : ['-fvisibility=default'])
186
187 libshared = shared_library(
188         libshared_name,
189 #if 0 /// UNNEEDED by elogind
190 #         libudev_sources,
191 #endif // 0
192         include_directories : includes,
193         link_args : ['-shared',
194                      '-Wl,--version-script=' + libshared_sym_path],
195         link_whole : [libshared_static,
196                       libbasic,
197 #if 0 /// UNNEEDED by elogind
198 #                       libbasic_gcrypt,
199 #                       libsystemd_static,
200 #                       libjournal_client],
201 #else
202                       libelogind_static],
203 #endif // 0
204         c_args : ['-fvisibility=default'],
205         dependencies : libshared_deps,
206         install : true,
207         install_dir : rootlibexecdir)