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