]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/core/meson.build
basic/terminal-util: add support for $NO_COLOR
[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 efi-random.c
70 efi-random.h
71 emergency-action.c
72 emergency-action.h
73 execute.c
74 execute.h
75 hostname-setup.c
76 hostname-setup.h
77 ima-setup.c
78 ima-setup.h
79 ip-address-access.c
80 ip-address-access.h
81 job.c
82 job.h
83 kill.c
84 kill.h
85 kmod-setup.c
86 kmod-setup.h
87 load-dropin.c
88 load-dropin.h
89 load-fragment.c
90 load-fragment.h
91 locale-setup.c
92 locale-setup.h
93 manager.c
94 manager.h
95 mount.c
96 mount.h
97 namespace.c
98 namespace.h
99 path.c
100 path.h
101 scope.c
102 scope.h
103 selinux-access.c
104 selinux-access.h
105 selinux-setup.c
106 selinux-setup.h
107 service.c
108 service.h
109 show-status.c
110 show-status.h
111 slice.c
112 slice.h
113 smack-setup.c
114 smack-setup.h
115 socket.c
116 socket.h
117 swap.c
118 swap.h
119 target.c
120 target.h
121 timer.c
122 timer.h
123 transaction.c
124 transaction.h
125 unit-printf.c
126 unit-printf.h
127 unit.c
128 unit.h
129 '''.split()
130
131 load_fragment_gperf_gperf = custom_target(
132 'load-fragment-gperf.gperf',
133 input : 'load-fragment-gperf.gperf.m4',
134 output: 'load-fragment-gperf.gperf',
135 command : [meson_apply_m4, config_h, '@INPUT@'],
136 capture : true)
137
138 load_fragment_gperf_c = custom_target(
139 'load-fragment-gperf.c',
140 input : load_fragment_gperf_gperf,
141 output : 'load-fragment-gperf.c',
142 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
143
144 awkscript = 'load-fragment-gperf-nulstr.awk'
145 load_fragment_gperf_nulstr_c = custom_target(
146 'load-fragment-gperf-nulstr.c',
147 input : [awkscript, load_fragment_gperf_gperf],
148 output : 'load-fragment-gperf-nulstr.c',
149 command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
150 capture : true)
151
152 # A convenience library to share code with other binaries:
153 # systemd-shutdown, systemd-remount-fs, systemd-machine-id-setup, …
154 libcore_shared = static_library(
155 'core-shared',
156 libcore_shared_sources,
157 include_directories : includes,
158 dependencies : [versiondep,
159 libmount])
160
161 libcore = static_library(
162 'core',
163 libcore_sources,
164 load_fragment_gperf_c,
165 load_fragment_gperf_nulstr_c,
166 include_directories : includes,
167 link_whole : libcore_shared,
168 dependencies : [versiondep,
169 threads,
170 librt,
171 libseccomp,
172 libpam,
173 libaudit,
174 libkmod,
175 libapparmor,
176 libselinux,
177 libmount])
178
179 systemd_sources = files('main.c')
180
181 in_files = [['macros.systemd', rpmmacrosdir],
182 ['system.conf', pkgsysconfdir],
183 ['user.conf', pkgsysconfdir],
184 ['systemd.pc', pkgconfigdatadir],
185 ['triggers.systemd', '']]
186
187 foreach item : in_files
188 file = item[0]
189 dir = item[1]
190
191 configure_file(
192 input : file + '.in',
193 output : file,
194 configuration : substs,
195 install_dir : dir == 'no' ? '' : dir)
196 endforeach
197
198 install_data('org.freedesktop.systemd1.conf',
199 install_dir : dbuspolicydir)
200
201 policy = configure_file(
202 input : 'org.freedesktop.systemd1.policy.in',
203 output : 'org.freedesktop.systemd1.policy',
204 configuration : substs)
205 install_data(policy,
206 install_dir : polkitpolicydir)
207
208 meson.add_install_script('sh', '-c', mkdir_p.format(systemshutdowndir))
209 meson.add_install_script('sh', '-c', mkdir_p.format(systemsleepdir))
210 meson.add_install_script('sh', '-c', mkdir_p.format(systemgeneratordir))
211 meson.add_install_script('sh', '-c', mkdir_p.format(usergeneratordir))
212
213 meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'system')))
214 meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'user')))
215 meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(sysconfdir, 'xdg/systemd')))