chiark / gitweb /
Prep v239: Mirror upstream and move pager.[hc] from shared to basic.
[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         sleep-config.c
122         sleep-config.h
123         spawn-polkit-agent.c
124         spawn-polkit-agent.h
125         udev-util.c
126         udev-util.h
127 '''.split()
128 #endif // 0
129
130 test_tables_h = files('test-tables.h')
131 shared_sources += [test_tables_h]
132
133 if conf.get('HAVE_ACL') == 1
134         shared_sources += files('acl-util.c')
135 endif
136
137 if conf.get('ENABLE_UTMP') == 1
138         shared_sources += files('utmp-wtmp.c')
139 endif
140
141 #if 0 /// UNNEEDED by elogind
142 # if conf.get('HAVE_SECCOMP') == 1
143 #         shared_sources += files('seccomp-util.c')
144 # endif
145
146 # if conf.get('HAVE_LIBIPTC') == 1
147 #         shared_sources += files('firewall-util.c')
148 # endif
149 #endif // 0
150
151 libshared_name = 'elogind-shared-@0@'.format(meson.project_version())
152
153 #if 0 /// elogind doesn't need all this
154 # libshared_deps = [threads,
155 #                   librt,
156 #                   libcap,
157 #                   libacl,
158 #                   libcryptsetup,
159 #                   libgcrypt,
160 #                   libiptc,
161 #                   libseccomp,
162 #                   libselinux,
163 #                   libidn,
164 #                   libxz,
165 #                   liblz4,
166 #                   libblkid]
167 #else
168 libshared_deps = [threads,
169                   libacl,
170                   libcap,
171                   libselinux]
172 #endif // 0
173
174 libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir())
175
176 libshared_static = static_library(
177         libshared_name,
178         shared_sources,
179         include_directories : includes,
180         dependencies : libshared_deps,
181         c_args : ['-fvisibility=default'])
182
183 libshared = shared_library(
184         libshared_name,
185 #if 0 /// UNNEEDED by elogind
186 #         libudev_sources,
187 #endif // 0
188         include_directories : includes,
189         link_args : ['-shared',
190                      '-Wl,--version-script=' + libshared_sym_path],
191         link_whole : [libshared_static,
192                       libbasic,
193 #if 0 /// UNNEEDED by elogind
194 #                       libbasic_gcrypt,
195 #                       libsystemd_static,
196 #                       libjournal_client],
197 #else
198                       libelogind_static],
199 #endif // 0
200         c_args : ['-fvisibility=default'],
201         dependencies : libshared_deps,
202         install : true,
203         install_dir : rootlibexecdir)