1 # SPDX-License-Identifier: LGPL-2.1-or-later
3 libcore_sources = files(
11 'bpf-restrict-ifaces.c',
40 'execute-serialize.c',
50 'manager-serialize.c',
67 'unit-dependency-atom.c',
73 if conf.get('BPF_FRAMEWORK') == 1
74 libcore_sources += files(
79 subdir('bpf/socket_bind')
80 subdir('bpf/restrict_fs')
81 subdir('bpf/restrict_ifaces')
83 if conf.get('BPF_FRAMEWORK') == 1
87 restrict_ifaces_skel_h]
90 load_fragment_gperf_gperf = custom_target(
91 'load-fragment-gperf.gperf',
92 input : 'load-fragment-gperf.gperf.in',
93 output: 'load-fragment-gperf.gperf',
94 command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'])
96 load_fragment_gperf_c = custom_target(
97 'load-fragment-gperf.c',
98 input : load_fragment_gperf_gperf,
99 output : 'load-fragment-gperf.c',
100 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
102 awkscript = 'load-fragment-gperf-nulstr.awk'
103 load_fragment_gperf_nulstr_c = custom_target(
104 'load-fragment-gperf-nulstr.c',
105 input : [awkscript, load_fragment_gperf_gperf],
106 output : 'load-fragment-gperf-nulstr.c',
107 command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
110 libcore_name = 'systemd-core-@0@'.format(shared_lib_tag)
112 libcore = shared_library(
115 load_fragment_gperf_c,
116 load_fragment_gperf_nulstr_c,
117 include_directories : includes,
118 c_args : ['-fvisibility=default'],
119 link_args : ['-shared',
120 '-Wl,--version-script=' + libshared_sym_path],
121 link_depends : libshared_sym_path,
122 link_with : libshared,
123 dependencies : [libacl,
138 install_dir : pkglibdir)
140 core_includes = [includes, include_directories('.')]
142 systemd_sources = files(
147 systemd_executor_sources = files(
157 'sources' : systemd_sources,
162 'dependencies' : libseccomp,
165 'name' : 'systemd-executor',
167 'sources' : systemd_executor_sources,
168 'include_directories' : core_includes,
181 'sources' : files('fuzz-unit-file.c'),
186 'dependencies' : libmount,
189 'sources' : files('fuzz-manager-serialize.c'),
196 'sources' : files('fuzz-execute-serialize.c'),
204 in_files = [['system.conf', pkgconfigfiledir],
205 ['user.conf', pkgconfigfiledir],
206 ['org.freedesktop.systemd1.policy', polkitpolicydir]]
208 foreach item : in_files
214 input : file + '.in',
216 command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
217 install : (dir == pkgconfigfiledir) ? install_sysconfdir_samples : (dir != 'no'),
221 systemd_pc = custom_target(
223 input : 'systemd.pc.in',
224 output : 'systemd.pc',
225 command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
226 install : pkgconfigdatadir != 'no',
227 install_tag : 'devel',
228 install_dir : pkgconfigdatadir)
230 install_data('org.freedesktop.systemd1.conf',
231 install_dir : dbuspolicydir)
232 install_data('org.freedesktop.systemd1.service',
233 install_dir : dbussystemservicedir)
235 install_emptydir(systemshutdowndir)
236 install_emptydir(systemsleepdir)
237 install_emptydir(systemgeneratordir)
238 install_emptydir(usergeneratordir)
240 if install_sysconfdir
241 install_emptydir(pkgsysconfdir / 'system')
242 install_emptydir(pkgsysconfdir / 'user')
243 install_emptydir(sysconfdir / 'xdg/systemd')
244 meson.add_install_script(sh, '-c', ln_s.format(pkgsysconfdir / 'user',
245 sysconfdir / 'xdg/systemd/user'))
248 install_emptydir(sbindir)
249 meson.add_install_script(sh, '-c', ln_s.format(libexecdir / 'systemd', sbindir / 'init'))
251 ############################################################
253 core_test_template = test_template + {
258 'include_directories' : core_includes,