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