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
217 spawn-ask-password-agent.c
218 spawn-ask-password-agent.h
264 if get_option('tests') != 'false'
265 shared_sources += files('tests.c', 'tests.h')
268 test_tables_h = files('test-tables.h')
269 shared_sources += test_tables_h
271 generate_syscall_list = find_program('generate-syscall-list.py')
272 fname = 'syscall-list.h'
273 syscall_list_h = custom_target(
275 input : 'syscall-names.text',
277 command : [generate_syscall_list,
281 if conf.get('HAVE_ACL') == 1
282 shared_sources += files('acl-util.c')
285 if conf.get('ENABLE_UTMP') == 1
286 shared_sources += files('utmp-wtmp.c')
289 if conf.get('HAVE_SECCOMP') == 1
290 shared_sources += files('seccomp-util.c')
291 shared_sources += syscall_list_h
294 if conf.get('HAVE_LIBIPTC') == 1
295 shared_sources += files('firewall-util.c')
298 if conf.get('HAVE_KMOD') == 1
299 shared_sources += files('module-util.c')
302 if conf.get('HAVE_PAM') == 1
303 shared_sources += files('''
309 generate_ip_protocol_list = find_program('generate-ip-protocol-list.sh')
310 ip_protocol_list_txt = custom_target(
311 'ip-protocol-list.txt',
312 output : 'ip-protocol-list.txt',
313 command : [generate_ip_protocol_list, cpp],
316 fname = 'ip-protocol-from-name.gperf'
317 gperf_file = custom_target(
319 input : ip_protocol_list_txt,
321 command : [generate_gperfs, 'ip_protocol', 'IPPROTO_', '@INPUT@'],
324 fname = 'ip-protocol-from-name.h'
325 target1 = custom_target(
330 '-L', 'ANSI-C', '-t', '--ignore-case',
331 '-N', 'lookup_ip_protocol',
332 '-H', 'hash_ip_protocol_name',
337 fname = 'ip-protocol-to-name.h'
338 awkscript = 'ip-protocol-to-name.awk'
339 target2 = custom_target(
341 input : [awkscript, ip_protocol_list_txt],
343 command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
346 shared_generated_gperf_headers = [target1, target2]
347 shared_sources += shared_generated_gperf_headers
349 libshared_name = 'systemd-shared-@0@'.format(meson.project_version())
351 libshared_deps = [threads,
370 libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir())
372 libshared_static = static_library(
375 include_directories : includes,
376 dependencies : libshared_deps,
377 c_args : ['-fvisibility=default'])
379 libshared = shared_library(
382 include_directories : includes,
383 link_args : ['-shared',
384 '-Wl,--version-script=' + libshared_sym_path],
385 link_whole : [libshared_static,
390 c_args : ['-fvisibility=default'],
391 dependencies : libshared_deps,
393 install_dir : rootlibexecdir)
395 ############################################################
398 'syscall-names-update',
399 command : [syscall_names_update_sh, meson.current_source_dir()])