]>
Commit | Line | Data |
---|---|---|
3a726fcd | 1 | # SPDX-License-Identifier: LGPL-2.1+ |
3a726fcd | 2 | |
2d4ceca8 | 3 | basic_sources = files(''' |
71e5200f DM |
4 | MurmurHash2.c |
5 | MurmurHash2.h | |
37efbbd8 ZJS |
6 | af-list.c |
7 | af-list.h | |
8 | alloc-util.c | |
9 | alloc-util.h | |
10 | architecture.c | |
11 | architecture.h | |
12 | arphrd-list.c | |
13 | arphrd-list.h | |
14 | async.c | |
15 | async.h | |
16 | audit-util.c | |
17 | audit-util.h | |
18c528e9 LP |
18 | blockdev-util.c |
19 | blockdev-util.h | |
37efbbd8 ZJS |
20 | btrfs-util.c |
21 | btrfs-util.h | |
22 | build.h | |
23 | bus-label.c | |
24 | bus-label.h | |
37efbbd8 ZJS |
25 | cap-list.c |
26 | cap-list.h | |
71e5200f DM |
27 | capability-util.c |
28 | capability-util.h | |
37efbbd8 ZJS |
29 | cgroup-util.c |
30 | cgroup-util.h | |
31 | chattr-util.c | |
32 | chattr-util.h | |
37efbbd8 ZJS |
33 | conf-files.c |
34 | conf-files.h | |
35 | copy.c | |
36 | copy.h | |
37efbbd8 ZJS |
37 | def.h |
38 | device-nodes.c | |
39 | device-nodes.h | |
40 | dirent-util.c | |
41 | dirent-util.h | |
686d13b9 LP |
42 | env-file.c |
43 | env-file.h | |
37efbbd8 ZJS |
44 | env-util.c |
45 | env-util.h | |
46 | errno-list.c | |
47 | errno-list.h | |
2b2fec7d | 48 | errno-util.h |
37efbbd8 ZJS |
49 | escape.c |
50 | escape.h | |
51 | ether-addr-util.c | |
52 | ether-addr-util.h | |
37efbbd8 ZJS |
53 | extract-word.c |
54 | extract-word.h | |
55 | fd-util.c | |
56 | fd-util.h | |
71e5200f DM |
57 | fileio.c |
58 | fileio.h | |
37efbbd8 ZJS |
59 | format-util.h |
60 | fs-util.c | |
61 | fs-util.h | |
62 | glob-util.c | |
63 | glob-util.h | |
64 | gunicode.c | |
65 | gunicode.h | |
66 | hash-funcs.c | |
67 | hash-funcs.h | |
68 | hashmap.c | |
69 | hashmap.h | |
70 | hexdecoct.c | |
71 | hexdecoct.h | |
72 | hostname-util.c | |
73 | hostname-util.h | |
74 | in-addr-util.c | |
75 | in-addr-util.h | |
37efbbd8 ZJS |
76 | io-util.c |
77 | io-util.h | |
71e5200f | 78 | ioprio.h |
f05e1d0d LP |
79 | kbd-util.c |
80 | kbd-util.h | |
37efbbd8 ZJS |
81 | khash.c |
82 | khash.h | |
83 | label.c | |
84 | label.h | |
eefc66aa LP |
85 | limits-util.c |
86 | limits-util.h | |
01234e1f YW |
87 | linux/btrfs.h |
88 | linux/btrfs_tree.h | |
89 | linux/can/vxcan.h | |
90 | linux/fib_rules.h | |
91 | linux/fou.h | |
92 | linux/if.h | |
93 | linux/if_addr.h | |
94 | linux/if_arp.h | |
95 | linux/if_bonding.h | |
96 | linux/if_bridge.h | |
97 | linux/if_link.h | |
45cae4ab | 98 | linux/if_macsec.h |
01234e1f YW |
99 | linux/if_tun.h |
100 | linux/if_tunnel.h | |
101 | linux/libc-compat.h | |
76566792 | 102 | linux/netdevice.h |
01234e1f YW |
103 | linux/netlink.h |
104 | linux/rtnetlink.h | |
105 | linux/wireguard.h | |
37efbbd8 ZJS |
106 | list.h |
107 | locale-util.c | |
108 | locale-util.h | |
37efbbd8 ZJS |
109 | log.c |
110 | log.h | |
111 | login-util.c | |
112 | login-util.h | |
113 | macro.h | |
114 | memfd-util.c | |
115 | memfd-util.h | |
0a970718 LP |
116 | memory-util.c |
117 | memory-util.h | |
37efbbd8 ZJS |
118 | mempool.c |
119 | mempool.h | |
18bf324a | 120 | missing.h |
0e7117d0 | 121 | missing_audit.h |
8ca2702f | 122 | missing_capability.h |
5b139f86 | 123 | missing_drm.h |
dea72eda | 124 | missing_fcntl.h |
503f480f | 125 | missing_fs.h |
31c2ddab | 126 | missing_input.h |
d7276b61 | 127 | missing_keyctl.h |
1e54f0ab | 128 | missing_magic.h |
c8a363eb | 129 | missing_mman.h |
475c18f0 | 130 | missing_network.h |
2a03bb3e | 131 | missing_prctl.h |
b19bb111 | 132 | missing_random.h |
6c76de27 | 133 | missing_resource.h |
22332e33 | 134 | missing_sched.h |
3843e826 | 135 | missing_securebits.h |
66ffbdf9 | 136 | missing_socket.h |
e01819f8 | 137 | missing_stat.h |
470f348b | 138 | missing_stdlib.h |
37efbbd8 | 139 | missing_syscall.h |
d7330b60 | 140 | missing_timerfd.h |
38e0c63d | 141 | missing_type.h |
71e5200f | 142 | mkdir-label.c |
37efbbd8 ZJS |
143 | mkdir.c |
144 | mkdir.h | |
049af8ad ZJS |
145 | mountpoint-util.c |
146 | mountpoint-util.h | |
0cb8e3d1 LP |
147 | namespace-util.c |
148 | namespace-util.h | |
37efbbd8 | 149 | nss-util.h |
d8b4d14d LP |
150 | nulstr-util.c |
151 | nulstr-util.h | |
37efbbd8 ZJS |
152 | ordered-set.c |
153 | ordered-set.h | |
154 | parse-util.c | |
155 | parse-util.h | |
156 | path-util.c | |
157 | path-util.h | |
e56f9ffe LP |
158 | plymouth-util.c |
159 | plymouth-util.h | |
37efbbd8 ZJS |
160 | prioq.c |
161 | prioq.h | |
162 | proc-cmdline.c | |
163 | proc-cmdline.h | |
164 | process-util.c | |
165 | process-util.h | |
9aef9a67 LP |
166 | procfs-util.c |
167 | procfs-util.h | |
37efbbd8 ZJS |
168 | random-util.c |
169 | random-util.h | |
170 | ratelimit.c | |
171 | ratelimit.h | |
172 | raw-clone.h | |
c52a937b | 173 | raw-reboot.h |
37efbbd8 ZJS |
174 | replace-var.c |
175 | replace-var.h | |
3c069cda LP |
176 | rlimit-util.c |
177 | rlimit-util.h | |
37efbbd8 ZJS |
178 | rm-rf.c |
179 | rm-rf.h | |
37efbbd8 ZJS |
180 | selinux-util.c |
181 | selinux-util.h | |
182 | set.h | |
183 | sigbus.c | |
184 | sigbus.h | |
185 | signal-util.c | |
186 | signal-util.h | |
187 | siphash24.c | |
188 | siphash24.h | |
189 | smack-util.c | |
190 | smack-util.h | |
191 | socket-label.c | |
192 | socket-util.c | |
193 | socket-util.h | |
760877e9 LP |
194 | sort-util.c |
195 | sort-util.h | |
37efbbd8 ZJS |
196 | sparse-endian.h |
197 | special.h | |
198 | stat-util.c | |
199 | stat-util.h | |
67e16c31 | 200 | static-destruct.h |
37efbbd8 ZJS |
201 | stdio-util.h |
202 | strbuf.c | |
203 | strbuf.h | |
204 | string-table.c | |
205 | string-table.h | |
206 | string-util.c | |
207 | string-util.h | |
208 | strv.c | |
209 | strv.h | |
210 | strxcpyx.c | |
211 | strxcpyx.h | |
212 | syslog-util.c | |
213 | syslog-util.h | |
214 | terminal-util.c | |
215 | terminal-util.h | |
216 | time-util.c | |
217 | time-util.h | |
e4de7287 LP |
218 | tmpfile-util.c |
219 | tmpfile-util.h | |
37efbbd8 ZJS |
220 | umask-util.h |
221 | unaligned.h | |
523578aa LP |
222 | unit-def.c |
223 | unit-def.h | |
18c528e9 LP |
224 | unit-name.c |
225 | unit-name.h | |
37efbbd8 ZJS |
226 | user-util.c |
227 | user-util.h | |
228 | utf8.c | |
229 | utf8.h | |
230 | util.c | |
231 | util.h | |
37efbbd8 ZJS |
232 | virt.c |
233 | virt.h | |
37efbbd8 ZJS |
234 | xattr-util.c |
235 | xattr-util.h | |
5c23128d ZJS |
236 | '''.split()) |
237 | ||
18bf324a | 238 | missing_audit_h = files('missing_audit.h') |
54480d64 | 239 | missing_capability_h = files('missing_capability.h') |
0b7d48f5 | 240 | missing_socket_h = files('missing_socket.h') |
5c23128d | 241 | |
5c23128d ZJS |
242 | generate_af_list = find_program('generate-af-list.sh') |
243 | af_list_txt = custom_target( | |
37efbbd8 ZJS |
244 | 'af-list.txt', |
245 | output : 'af-list.txt', | |
0b7d48f5 | 246 | command : [generate_af_list, cpp, config_h, missing_socket_h], |
37efbbd8 | 247 | capture : true) |
5c23128d ZJS |
248 | |
249 | generate_arphrd_list = find_program('generate-arphrd-list.sh') | |
250 | arphrd_list_txt = custom_target( | |
37efbbd8 ZJS |
251 | 'arphrd-list.txt', |
252 | output : 'arphrd-list.txt', | |
01234e1f | 253 | command : [generate_arphrd_list, cpp, config_h], |
37efbbd8 | 254 | capture : true) |
5c23128d ZJS |
255 | |
256 | generate_cap_list = find_program('generate-cap-list.sh') | |
257 | cap_list_txt = custom_target( | |
37efbbd8 ZJS |
258 | 'cap-list.txt', |
259 | output : 'cap-list.txt', | |
54480d64 | 260 | command : [generate_cap_list, cpp, config_h, missing_capability_h], |
37efbbd8 | 261 | capture : true) |
5c23128d ZJS |
262 | |
263 | generate_errno_list = find_program('generate-errno-list.sh') | |
264 | errno_list_txt = custom_target( | |
37efbbd8 ZJS |
265 | 'errno-list.txt', |
266 | output : 'errno-list.txt', | |
267 | command : [generate_errno_list, cpp], | |
268 | capture : true) | |
5c23128d ZJS |
269 | |
270 | generated_gperf_headers = [] | |
271 | foreach item : [['af', af_list_txt, 'af', ''], | |
272 | ['arphrd', arphrd_list_txt, 'arphrd', 'ARPHRD_'], | |
273 | ['cap', cap_list_txt, 'capability', ''], | |
7b5e750d | 274 | ['errno', errno_list_txt, 'errno', '']] |
5c23128d | 275 | |
37efbbd8 ZJS |
276 | fname = '@0@-from-name.gperf'.format(item[0]) |
277 | gperf_file = custom_target( | |
278 | fname, | |
279 | input : item[1], | |
280 | output : fname, | |
281 | command : [generate_gperfs, item[2], item[3], '@INPUT@'], | |
282 | capture : true) | |
5c23128d | 283 | |
37efbbd8 ZJS |
284 | fname = '@0@-from-name.h'.format(item[0]) |
285 | target1 = custom_target( | |
286 | fname, | |
287 | input : gperf_file, | |
288 | output : fname, | |
289 | command : [gperf, | |
290 | '-L', 'ANSI-C', '-t', '--ignore-case', | |
291 | '-N', 'lookup_@0@'.format(item[2]), | |
292 | '-H', 'hash_@0@_name'.format(item[2]), | |
293 | '-p', '-C', | |
294 | '@INPUT@'], | |
295 | capture : true) | |
5c23128d | 296 | |
37efbbd8 ZJS |
297 | fname = '@0@-to-name.h'.format(item[0]) |
298 | awkscript = '@0@-to-name.awk'.format(item[0]) | |
299 | target2 = custom_target( | |
300 | fname, | |
301 | input : [awkscript, item[1]], | |
302 | output : fname, | |
303 | command : [awk, '-f', '@INPUT0@', '@INPUT1@'], | |
304 | capture : true) | |
5c23128d | 305 | |
37efbbd8 | 306 | generated_gperf_headers += [target1, target2] |
5c23128d ZJS |
307 | endforeach |
308 | ||
18bf324a | 309 | basic_sources += generated_gperf_headers |
975464e0 ZJS |
310 | basic_gcrypt_sources = files( |
311 | 'gcrypt-util.c', | |
312 | 'gcrypt-util.h') | |
5c23128d ZJS |
313 | |
314 | libbasic = static_library( | |
37efbbd8 ZJS |
315 | 'basic', |
316 | basic_sources, | |
317 | include_directories : includes, | |
d1084aa2 LT |
318 | dependencies : [versiondep, |
319 | threads, | |
37efbbd8 | 320 | libcap, |
cd0b6c53 LP |
321 | libselinux, |
322 | libm], | |
2d4ceca8 | 323 | c_args : ['-fvisibility=default'], |
37efbbd8 | 324 | install : false) |
34e221a5 ZJS |
325 | |
326 | # A convenience library that is separate from libbasic to avoid | |
327 | # unnecessary linking to libgcrypt. | |
328 | libbasic_gcrypt = static_library( | |
329 | 'basic-gcrypt', | |
975464e0 | 330 | basic_gcrypt_sources, |
34e221a5 ZJS |
331 | include_directories : includes, |
332 | dependencies : [libgcrypt], | |
333 | c_args : ['-fvisibility=default']) |