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