1 # SPDX-License-Identifier: LGPL-2.1+
3 shared_sources = files('''
110 linux/auto_dev-ioctl.h
133 netif-naming-scheme.c
134 netif-naming-scheme.h
170 spawn-ask-password-agent.c
171 spawn-ask-password-agent.h
209 if get_option('tests') != 'false'
210 shared_sources += files('tests.c', 'tests.h')
213 test_tables_h = files('test-tables.h')
214 shared_sources += test_tables_h
216 if conf.get('HAVE_ACL') == 1
217 shared_sources += files('acl-util.c')
220 if conf.get('ENABLE_UTMP') == 1
221 shared_sources += files('utmp-wtmp.c')
224 if conf.get('HAVE_SECCOMP') == 1
225 shared_sources += files('seccomp-util.c')
228 if conf.get('HAVE_LIBIPTC') == 1
229 shared_sources += files('firewall-util.c')
232 if conf.get('HAVE_KMOD') == 1
233 shared_sources += files('module-util.c')
236 generate_ip_protocol_list = find_program('generate-ip-protocol-list.sh')
237 ip_protocol_list_txt = custom_target(
238 'ip-protocol-list.txt',
239 output : 'ip-protocol-list.txt',
240 command : [generate_ip_protocol_list, cpp],
243 fname = 'ip-protocol-from-name.gperf'
244 gperf_file = custom_target(
246 input : ip_protocol_list_txt,
248 command : [generate_gperfs, 'ip_protocol', 'IPPROTO_', '@INPUT@'],
251 fname = 'ip-protocol-from-name.h'
252 target1 = custom_target(
257 '-L', 'ANSI-C', '-t', '--ignore-case',
258 '-N', 'lookup_ip_protocol',
259 '-H', 'hash_ip_protocol_name',
264 fname = 'ip-protocol-to-name.h'
265 awkscript = 'ip-protocol-to-name.awk'
266 target2 = custom_target(
268 input : [awkscript, ip_protocol_list_txt],
270 command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
273 shared_generated_gperf_headers = [target1, target2]
274 shared_sources += shared_generated_gperf_headers
276 libshared_name = 'systemd-shared-@0@'.format(meson.project_version())
278 libshared_deps = [threads,
296 libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir())
298 libshared_static = static_library(
301 include_directories : includes,
302 dependencies : libshared_deps,
303 c_args : ['-fvisibility=default'])
305 libshared = shared_library(
308 include_directories : includes,
309 link_args : ['-shared',
310 '-Wl,--version-script=' + libshared_sym_path],
311 link_whole : [libshared_static,
316 c_args : ['-fvisibility=default'],
317 dependencies : libshared_deps,
319 install_dir : rootlibexecdir)