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