1 # SPDX-License-Identifier: LGPL-2.1+
3 shared_sources = files('''
44 bus-print-properties.c
45 bus-print-properties.h
143 linux/auto_dev-ioctl.h
170 netif-naming-scheme.c
171 netif-naming-scheme.h
211 spawn-ask-password-agent.c
212 spawn-ask-password-agent.h
258 if get_option('tests') != 'false'
259 shared_sources += files('tests.c', 'tests.h')
262 test_tables_h = files('test-tables.h')
263 shared_sources += test_tables_h
265 generate_syscall_list = find_program('generate-syscall-list.py')
266 fname = 'syscall-list.h'
267 syscall_list_h = custom_target(
269 input : 'syscall-names.text',
271 command : [generate_syscall_list,
275 if conf.get('HAVE_ACL') == 1
276 shared_sources += files('acl-util.c')
279 if conf.get('ENABLE_UTMP') == 1
280 shared_sources += files('utmp-wtmp.c')
283 if conf.get('HAVE_SECCOMP') == 1
284 shared_sources += files('seccomp-util.c')
285 shared_sources += syscall_list_h
288 if conf.get('HAVE_LIBIPTC') == 1
289 shared_sources += files('firewall-util.c')
292 if conf.get('HAVE_KMOD') == 1
293 shared_sources += files('module-util.c')
296 if conf.get('HAVE_PAM') == 1
297 shared_sources += files('''
303 if conf.get('HAVE_QRENCODE') == 1
304 shared_sources += files('''
310 generate_ip_protocol_list = find_program('generate-ip-protocol-list.sh')
311 ip_protocol_list_txt = custom_target(
312 'ip-protocol-list.txt',
313 output : 'ip-protocol-list.txt',
314 command : [generate_ip_protocol_list, cpp],
317 fname = 'ip-protocol-from-name.gperf'
318 gperf_file = custom_target(
320 input : ip_protocol_list_txt,
322 command : [generate_gperfs, 'ip_protocol', 'IPPROTO_', '@INPUT@'],
325 fname = 'ip-protocol-from-name.h'
326 target1 = custom_target(
331 '-L', 'ANSI-C', '-t', '--ignore-case',
332 '-N', 'lookup_ip_protocol',
333 '-H', 'hash_ip_protocol_name',
338 fname = 'ip-protocol-to-name.h'
339 awkscript = 'ip-protocol-to-name.awk'
340 target2 = custom_target(
342 input : [awkscript, ip_protocol_list_txt],
344 command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
347 shared_generated_gperf_headers = [target1, target2]
348 shared_sources += shared_generated_gperf_headers
350 libshared_name = 'systemd-shared-@0@'.format(meson.project_version())
352 libshared_deps = [threads,
372 libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir())
374 libshared_static = static_library(
377 include_directories : includes,
378 dependencies : libshared_deps,
379 c_args : ['-fvisibility=default'])
381 libshared = shared_library(
384 include_directories : includes,
385 link_args : ['-shared',
386 '-Wl,--version-script=' + libshared_sym_path],
387 link_whole : [libshared_static,
392 c_args : ['-fvisibility=default'],
393 dependencies : libshared_deps,
395 install_dir : rootlibexecdir)
397 ############################################################
400 'syscall-names-update',
401 command : [syscall_names_update_sh, meson.current_source_dir()])