]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/meson.build
Merge pull request #10963 from poettering/bus-force-state-change-signal
[thirdparty/systemd.git] / src / basic / meson.build
1 # SPDX-License-Identifier: LGPL-2.1+
2
3 basic_sources = files('''
4 MurmurHash2.c
5 MurmurHash2.h
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
18 blockdev-util.c
19 blockdev-util.h
20 btrfs-util.c
21 btrfs-util.h
22 build.h
23 bus-label.c
24 bus-label.h
25 cap-list.c
26 cap-list.h
27 capability-util.c
28 capability-util.h
29 cgroup-util.c
30 cgroup-util.h
31 chattr-util.c
32 chattr-util.h
33 conf-files.c
34 conf-files.h
35 copy.c
36 copy.h
37 def.h
38 device-nodes.c
39 device-nodes.h
40 dirent-util.c
41 dirent-util.h
42 env-file.c
43 env-file.h
44 env-util.c
45 env-util.h
46 errno-list.c
47 errno-list.h
48 escape.c
49 escape.h
50 ether-addr-util.c
51 ether-addr-util.h
52 extract-word.c
53 extract-word.h
54 fd-util.c
55 fd-util.h
56 fileio.c
57 fileio.h
58 format-util.h
59 fs-util.c
60 fs-util.h
61 glob-util.c
62 glob-util.h
63 gunicode.c
64 gunicode.h
65 hash-funcs.c
66 hash-funcs.h
67 hashmap.c
68 hashmap.h
69 hexdecoct.c
70 hexdecoct.h
71 hostname-util.c
72 hostname-util.h
73 in-addr-util.c
74 in-addr-util.h
75 io-util.c
76 io-util.h
77 ioprio.h
78 khash.c
79 khash.h
80 label.c
81 label.h
82 list.h
83 locale-util.c
84 locale-util.h
85 log.c
86 log.h
87 login-util.c
88 login-util.h
89 macro.h
90 memfd-util.c
91 memfd-util.h
92 mempool.c
93 mempool.h
94 missing_btrfs.h
95 missing_btrfs_tree.h
96 missing_capability.h
97 missing_ethtool.h
98 missing_fib_rules.h
99 missing_fou.h
100 missing_if_bridge.h
101 missing_if_link.h
102 missing_if_tunnel.h
103 missing_input.h
104 missing_keyctl.h
105 missing_magic.h
106 missing_network.h
107 missing_prctl.h
108 missing_securebits.h
109 missing_stat.h
110 missing_syscall.h
111 missing_type.h
112 missing_vxcan.h
113 mkdir-label.c
114 mkdir.c
115 mkdir.h
116 mountpoint-util.c
117 mountpoint-util.h
118 nss-util.h
119 ordered-set.c
120 ordered-set.h
121 parse-util.c
122 parse-util.h
123 path-util.c
124 path-util.h
125 prioq.c
126 prioq.h
127 proc-cmdline.c
128 proc-cmdline.h
129 process-util.c
130 process-util.h
131 procfs-util.c
132 procfs-util.h
133 random-util.c
134 random-util.h
135 ratelimit.c
136 ratelimit.h
137 raw-clone.h
138 raw-reboot.h
139 refcnt.h
140 replace-var.c
141 replace-var.h
142 rm-rf.c
143 rm-rf.h
144 selinux-util.c
145 selinux-util.h
146 set.h
147 sigbus.c
148 sigbus.h
149 signal-util.c
150 signal-util.h
151 siphash24.c
152 siphash24.h
153 smack-util.c
154 smack-util.h
155 socket-label.c
156 socket-util.c
157 socket-util.h
158 sparse-endian.h
159 special.h
160 stat-util.c
161 stat-util.h
162 static-destruct.h
163 stdio-util.h
164 strbuf.c
165 strbuf.h
166 string-table.c
167 string-table.h
168 string-util.c
169 string-util.h
170 strv.c
171 strv.h
172 strxcpyx.c
173 strxcpyx.h
174 syslog-util.c
175 syslog-util.h
176 terminal-util.c
177 terminal-util.h
178 time-util.c
179 time-util.h
180 tmpfile-util.c
181 tmpfile-util.h
182 umask-util.h
183 unaligned.h
184 unit-def.c
185 unit-def.h
186 unit-name.c
187 unit-name.h
188 user-util.c
189 user-util.h
190 utf8.c
191 utf8.h
192 util.c
193 util.h
194 virt.c
195 virt.h
196 xattr-util.c
197 xattr-util.h
198 '''.split())
199
200 missing_h = files('missing.h')
201
202 generate_af_list = find_program('generate-af-list.sh')
203 af_list_txt = custom_target(
204 'af-list.txt',
205 output : 'af-list.txt',
206 command : [generate_af_list, cpp],
207 capture : true)
208
209 generate_arphrd_list = find_program('generate-arphrd-list.sh')
210 arphrd_list_txt = custom_target(
211 'arphrd-list.txt',
212 output : 'arphrd-list.txt',
213 command : [generate_arphrd_list, cpp],
214 capture : true)
215
216 generate_cap_list = find_program('generate-cap-list.sh')
217 cap_list_txt = custom_target(
218 'cap-list.txt',
219 output : 'cap-list.txt',
220 command : [generate_cap_list, cpp, config_h, missing_h],
221 capture : true)
222
223 generate_errno_list = find_program('generate-errno-list.sh')
224 errno_list_txt = custom_target(
225 'errno-list.txt',
226 output : 'errno-list.txt',
227 command : [generate_errno_list, cpp],
228 capture : true)
229
230 generated_gperf_headers = []
231 foreach item : [['af', af_list_txt, 'af', ''],
232 ['arphrd', arphrd_list_txt, 'arphrd', 'ARPHRD_'],
233 ['cap', cap_list_txt, 'capability', ''],
234 ['errno', errno_list_txt, 'errno', '']]
235
236 fname = '@0@-from-name.gperf'.format(item[0])
237 gperf_file = custom_target(
238 fname,
239 input : item[1],
240 output : fname,
241 command : [generate_gperfs, item[2], item[3], '@INPUT@'],
242 capture : true)
243
244 fname = '@0@-from-name.h'.format(item[0])
245 target1 = custom_target(
246 fname,
247 input : gperf_file,
248 output : fname,
249 command : [gperf,
250 '-L', 'ANSI-C', '-t', '--ignore-case',
251 '-N', 'lookup_@0@'.format(item[2]),
252 '-H', 'hash_@0@_name'.format(item[2]),
253 '-p', '-C',
254 '@INPUT@'],
255 capture : true)
256
257 fname = '@0@-to-name.h'.format(item[0])
258 awkscript = '@0@-to-name.awk'.format(item[0])
259 target2 = custom_target(
260 fname,
261 input : [awkscript, item[1]],
262 output : fname,
263 command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
264 capture : true)
265
266 generated_gperf_headers += [target1, target2]
267 endforeach
268
269 basic_sources += [missing_h] + generated_gperf_headers
270 basic_gcrypt_sources = files(
271 'gcrypt-util.c',
272 'gcrypt-util.h')
273
274 libbasic = static_library(
275 'basic',
276 basic_sources,
277 include_directories : includes,
278 dependencies : [threads,
279 libcap,
280 libselinux,
281 libm],
282 c_args : ['-fvisibility=default'],
283 install : false)
284
285 # A convenience library that is separate from libbasic to avoid
286 # unnecessary linking to libgcrypt.
287 libbasic_gcrypt = static_library(
288 'basic-gcrypt',
289 basic_gcrypt_sources,
290 include_directories : includes,
291 dependencies : [libgcrypt],
292 c_args : ['-fvisibility=default'])