]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/core/meson.build
f6e1f661779ded8bd3b3239a47ec40cae7927554
[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 dbus-automount.c
26 dbus-automount.h
27 dbus-cgroup.c
28 dbus-cgroup.h
29 dbus-device.c
30 dbus-device.h
31 dbus-execute.c
32 dbus-execute.h
33 dbus-job.c
34 dbus-job.h
35 dbus-kill.c
36 dbus-kill.h
37 dbus-manager.c
38 dbus-manager.h
39 dbus-mount.c
40 dbus-mount.h
41 dbus-path.c
42 dbus-path.h
43 dbus-scope.c
44 dbus-scope.h
45 dbus-service.c
46 dbus-service.h
47 dbus-slice.c
48 dbus-slice.h
49 dbus-socket.c
50 dbus-socket.h
51 dbus-swap.c
52 dbus-swap.h
53 dbus-target.c
54 dbus-target.h
55 dbus-timer.c
56 dbus-timer.h
57 dbus-unit.c
58 dbus-unit.h
59 dbus-util.c
60 dbus-util.h
61 dbus.c
62 dbus.h
63 device.c
64 device.h
65 dynamic-user.c
66 dynamic-user.h
67 efi-random.c
68 efi-random.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 ['user.conf', pkgsysconfdir],
182 ['systemd.pc', pkgconfigdatadir],
183 ['triggers.systemd', '']]
184
185 foreach item : in_files
186 file = item[0]
187 dir = item[1]
188
189 configure_file(
190 input : file + '.in',
191 output : file,
192 configuration : substs,
193 install_dir : dir == 'no' ? '' : dir)
194 endforeach
195
196 install_data('org.freedesktop.systemd1.conf',
197 install_dir : dbuspolicydir)
198
199 policy = configure_file(
200 input : 'org.freedesktop.systemd1.policy.in',
201 output : 'org.freedesktop.systemd1.policy',
202 configuration : substs)
203 install_data(policy,
204 install_dir : polkitpolicydir)
205
206 meson.add_install_script('sh', '-c', mkdir_p.format(systemshutdowndir))
207 meson.add_install_script('sh', '-c', mkdir_p.format(systemsleepdir))
208 meson.add_install_script('sh', '-c', mkdir_p.format(systemgeneratordir))
209 meson.add_install_script('sh', '-c', mkdir_p.format(usergeneratordir))
210
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')))