1 # SPDX-License-Identifier: LGPL-2.1-or-later
3 shared_sources = files('''
44 bus-print-properties.c
45 bus-print-properties.h
108 firewall-util-private.h
157 linux/auto_dev-ioctl.h
190 netif-naming-scheme.c
191 netif-naming-scheme.h
237 spawn-ask-password-agent.c
238 spawn-ask-password-agent.h
284 if get_option('tests') != 'false'
285 shared_sources += files('''
292 generate_syscall_list = find_program('generate-syscall-list.py')
293 fname = 'syscall-list.h'
294 syscall_list_h = custom_target(
296 input : syscall_list_txt,
298 command : [generate_syscall_list,
302 if conf.get('HAVE_ACL') == 1
303 shared_sources += files('''
309 if conf.get('ENABLE_UTMP') == 1
310 shared_sources += files('utmp-wtmp.c')
313 if conf.get('HAVE_SECCOMP') == 1
314 shared_sources += files('seccomp-util.c')
315 shared_sources += syscall_list_h
318 if conf.get('HAVE_LIBIPTC') == 1
319 shared_sources += files('firewall-util-iptables.c')
322 if conf.get('HAVE_KMOD') == 1
323 shared_sources += files('module-util.c')
326 if conf.get('HAVE_PAM') == 1
327 shared_sources += files(
332 if conf.get('ENABLE_NSCD') == 1
333 shared_sources += files('nscd-flush.c')
336 generate_ip_protocol_list = find_program('generate-ip-protocol-list.sh')
337 ip_protocol_list_txt = custom_target(
338 'ip-protocol-list.txt',
339 output : 'ip-protocol-list.txt',
340 command : [generate_ip_protocol_list, cpp],
343 fname = 'ip-protocol-from-name.gperf'
344 gperf_file = custom_target(
346 input : ip_protocol_list_txt,
348 command : [generate_gperfs, 'ip_protocol', 'IPPROTO_', '@INPUT@'],
351 fname = 'ip-protocol-from-name.h'
352 target1 = custom_target(
357 '-L', 'ANSI-C', '-t', '--ignore-case',
358 '-N', 'lookup_ip_protocol',
359 '-H', 'hash_ip_protocol_name',
364 fname = 'ip-protocol-to-name.h'
365 awkscript = 'ip-protocol-to-name.awk'
366 target2 = custom_target(
368 input : [awkscript, ip_protocol_list_txt],
370 command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
373 shared_generated_gperf_headers = [target1, target2]
374 shared_sources += shared_generated_gperf_headers
376 libshared_name = 'systemd-shared-@0@'.format(meson.project_version())
378 libshared_deps = [threads,
397 libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir())
399 libshared_static = static_library(
402 include_directories : includes,
403 dependencies : libshared_deps,
404 c_args : ['-fvisibility=default'])
406 libshared = shared_library(
408 include_directories : includes,
409 link_args : ['-shared',
410 '-Wl,--version-script=' + libshared_sym_path],
411 link_whole : [libshared_static,
415 c_args : ['-fvisibility=default'],
416 dependencies : libshared_deps,
418 install_dir : rootlibexecdir)