]> git.proxmox.com Git - systemd.git/blob - src/core/meson.build
New upstream version 249~rc1
[systemd.git] / src / core / meson.build
1 # SPDX-License-Identifier: LGPL-2.1-or-later
2
3 libcore_sources = '''
4 apparmor-setup.c
5 apparmor-setup.h
6 audit-fd.c
7 audit-fd.h
8 automount.c
9 automount.h
10 bpf-devices.c
11 bpf-devices.h
12 bpf-firewall.c
13 bpf-firewall.h
14 bpf-foreign.c
15 bpf-foreign.h
16 bpf-socket-bind.c
17 bpf-socket-bind.h
18 cgroup.c
19 cgroup.h
20 core-varlink.c
21 core-varlink.h
22 dbus-automount.c
23 dbus-automount.h
24 dbus-cgroup.c
25 dbus-cgroup.h
26 dbus-device.c
27 dbus-device.h
28 dbus-execute.c
29 dbus-execute.h
30 dbus-job.c
31 dbus-job.h
32 dbus-kill.c
33 dbus-kill.h
34 dbus-manager.c
35 dbus-manager.h
36 dbus-mount.c
37 dbus-mount.h
38 dbus-path.c
39 dbus-path.h
40 dbus-scope.c
41 dbus-scope.h
42 dbus-service.c
43 dbus-service.h
44 dbus-slice.c
45 dbus-slice.h
46 dbus-socket.c
47 dbus-socket.h
48 dbus-swap.c
49 dbus-swap.h
50 dbus-target.c
51 dbus-target.h
52 dbus-timer.c
53 dbus-timer.h
54 dbus-unit.c
55 dbus-unit.h
56 dbus-util.c
57 dbus-util.h
58 dbus.c
59 dbus.h
60 device.c
61 device.h
62 dynamic-user.c
63 dynamic-user.h
64 efi-random.c
65 efi-random.h
66 emergency-action.c
67 emergency-action.h
68 execute.c
69 execute.h
70 generator-setup.c
71 generator-setup.h
72 ima-setup.c
73 ima-setup.h
74 ip-address-access.c
75 ip-address-access.h
76 job.c
77 job.h
78 kill.c
79 kill.h
80 kmod-setup.c
81 kmod-setup.h
82 load-dropin.c
83 load-dropin.h
84 load-fragment.c
85 load-fragment.h
86 locale-setup.c
87 locale-setup.h
88 manager-dump.c
89 manager-dump.h
90 manager.c
91 manager.h
92 mount.c
93 mount.h
94 namespace.c
95 namespace.h
96 path.c
97 path.h
98 scope.c
99 scope.h
100 selinux-access.c
101 selinux-access.h
102 selinux-setup.c
103 selinux-setup.h
104 service.c
105 service.h
106 show-status.c
107 show-status.h
108 slice.c
109 slice.h
110 smack-setup.c
111 smack-setup.h
112 socket.c
113 socket.h
114 swap.c
115 swap.h
116 target.c
117 target.h
118 timer.c
119 timer.h
120 transaction.c
121 transaction.h
122 unit-dependency-atom.c
123 unit-dependency-atom.h
124 unit-printf.c
125 unit-printf.h
126 unit-serialize.c
127 unit-serialize.h
128 unit.c
129 unit.h
130 '''.split()
131
132 subdir('bpf/socket_bind')
133 if conf.get('BPF_FRAMEWORK') == 1
134 libcore_sources += [socket_bind_skel_h]
135 endif
136
137 load_fragment_gperf_gperf = custom_target(
138 'load-fragment-gperf.gperf',
139 input : 'load-fragment-gperf.gperf.in',
140 output: 'load-fragment-gperf.gperf',
141 command : [meson_render_jinja2, config_h, '@INPUT@'],
142 capture : true)
143
144 load_fragment_gperf_c = custom_target(
145 'load-fragment-gperf.c',
146 input : load_fragment_gperf_gperf,
147 output : 'load-fragment-gperf.c',
148 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
149
150 awkscript = 'load-fragment-gperf-nulstr.awk'
151 load_fragment_gperf_nulstr_c = custom_target(
152 'load-fragment-gperf-nulstr.c',
153 input : [awkscript, load_fragment_gperf_gperf],
154 output : 'load-fragment-gperf-nulstr.c',
155 command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
156 capture : true)
157
158 libcore = static_library(
159 'core',
160 libcore_sources,
161 load_fragment_gperf_c,
162 load_fragment_gperf_nulstr_c,
163 include_directories : includes,
164 dependencies : [versiondep,
165 threads,
166 libdl,
167 librt,
168 libseccomp,
169 libpam,
170 libaudit,
171 libkmod,
172 libapparmor,
173 libselinux,
174 libmount,
175 libacl])
176
177 core_includes = [includes, include_directories('.')]
178
179 systemd_sources = files('main.c')
180
181 in_files = [['system.conf', pkgsysconfdir],
182 ['user.conf', pkgsysconfdir],
183 ['systemd.pc', pkgconfigdatadir],
184 ['org.freedesktop.systemd1.policy', polkitpolicydir]]
185
186 foreach item : in_files
187 file = item[0]
188 dir = item[1]
189
190 custom_target(
191 file,
192 input : file + '.in',
193 output: file,
194 command : [meson_render_jinja2, config_h, '@INPUT@'],
195 capture : true,
196 install : dir != 'no',
197 install_dir : dir)
198 endforeach
199
200 install_data('org.freedesktop.systemd1.conf',
201 install_dir : dbuspolicydir)
202 install_data('org.freedesktop.systemd1.service',
203 install_dir : dbussystemservicedir)
204
205 meson.add_install_script('sh', '-c', mkdir_p.format(systemshutdowndir))
206 meson.add_install_script('sh', '-c', mkdir_p.format(systemsleepdir))
207 meson.add_install_script('sh', '-c', mkdir_p.format(systemgeneratordir))
208 meson.add_install_script('sh', '-c', mkdir_p.format(usergeneratordir))
209
210 if install_sysconfdir
211 meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'system')))
212 meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'user')))
213 meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(sysconfdir, 'xdg/systemd')))
214 endif
215
216 ############################################################
217
218 fuzzers += [
219 [['src/core/fuzz-unit-file.c'],
220 [libcore,
221 libshared],
222 [libmount]],
223 ]