1 # SPDX-License-Identifier: LGPL-2.1+
3 shared_sources = files('''
44 bus-print-properties.c
45 bus-print-properties.h
145 linux/auto_dev-ioctl.h
172 netif-naming-scheme.c
173 netif-naming-scheme.h
215 spawn-ask-password-agent.c
216 spawn-ask-password-agent.h
262 if get_option('tests') != 'false'
263 shared_sources += files('tests.c', 'tests.h')
266 test_tables_h = files('test-tables.h')
267 shared_sources += test_tables_h
269 generate_syscall_list = find_program('generate-syscall-list.py')
270 fname = 'syscall-list.h'
271 syscall_list_h = custom_target(
273 input : 'syscall-names.text',
275 command : [generate_syscall_list,
279 if conf.get('HAVE_ACL') == 1
280 shared_sources += files('acl-util.c')
283 if conf.get('ENABLE_UTMP') == 1
284 shared_sources += files('utmp-wtmp.c')
287 if conf.get('HAVE_SECCOMP') == 1
288 shared_sources += files('seccomp-util.c')
289 shared_sources += syscall_list_h
292 if conf.get('HAVE_LIBIPTC') == 1
293 shared_sources += files('firewall-util.c')
296 if conf.get('HAVE_KMOD') == 1
297 shared_sources += files('module-util.c')
300 if conf.get('HAVE_PAM') == 1
301 shared_sources += files('''
307 if conf.get('HAVE_QRENCODE') == 1
308 shared_sources += files('''
314 generate_ip_protocol_list = find_program('generate-ip-protocol-list.sh')
315 ip_protocol_list_txt = custom_target(
316 'ip-protocol-list.txt',
317 output : 'ip-protocol-list.txt',
318 command : [generate_ip_protocol_list, cpp],
321 fname = 'ip-protocol-from-name.gperf'
322 gperf_file = custom_target(
324 input : ip_protocol_list_txt,
326 command : [generate_gperfs, 'ip_protocol', 'IPPROTO_', '@INPUT@'],
329 fname = 'ip-protocol-from-name.h'
330 target1 = custom_target(
335 '-L', 'ANSI-C', '-t', '--ignore-case',
336 '-N', 'lookup_ip_protocol',
337 '-H', 'hash_ip_protocol_name',
342 fname = 'ip-protocol-to-name.h'
343 awkscript = 'ip-protocol-to-name.awk'
344 target2 = custom_target(
346 input : [awkscript, ip_protocol_list_txt],
348 command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
351 shared_generated_gperf_headers = [target1, target2]
352 shared_sources += shared_generated_gperf_headers
354 libshared_name = 'systemd-shared-@0@'.format(meson.project_version())
356 libshared_deps = [threads,
375 libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir())
377 libshared_static = static_library(
380 include_directories : includes,
381 dependencies : libshared_deps,
382 c_args : ['-fvisibility=default'])
384 libshared = shared_library(
387 include_directories : includes,
388 link_args : ['-shared',
389 '-Wl,--version-script=' + libshared_sym_path],
390 link_whole : [libshared_static,
395 c_args : ['-fvisibility=default'],
396 dependencies : libshared_deps,
398 install_dir : rootlibexecdir)
400 ############################################################
403 'syscall-names-update',
404 command : [syscall_names_update_sh, meson.current_source_dir()])