1# SPDX-License-Identifier: LGPL-2.1-or-later 2 3libudev_sources = files( 4 'libudev-device.c', 5 'libudev-device-internal.h', 6 'libudev-enumerate.c', 7 'libudev-hwdb.c', 8 'libudev-list.c', 9 'libudev-list-internal.h', 10 'libudev-monitor.c', 11 'libudev-queue.c', 12 'libudev-util.c', 13 'libudev-util.h', 14 'libudev.c', 15 'libudev.h') 16 17############################################################ 18 19libudev_includes = [includes, include_directories('.')] 20 21libudev_sym = files('libudev.sym') 22libudev_sym_path = meson.current_source_dir() / 'libudev.sym' 23 24install_headers('libudev.h') 25libudev_h_path = meson.current_source_dir() / 'libudev.h' 26 27libudev_basic = static_library( 28 'udev-basic', 29 libudev_sources, 30 include_directories : includes, 31 c_args : ['-fvisibility=default'], 32 build_by_default : false) 33 34static_libudev = get_option('static-libudev') 35static_libudev_pic = static_libudev == 'true' or static_libudev == 'pic' 36 37custom_target( 38 'libudev.pc', 39 input : 'libudev.pc.in', 40 output : 'libudev.pc', 41 command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'], 42 install : pkgconfiglibdir != 'no', 43 install_tag : 'devel', 44 install_dir : pkgconfiglibdir) 45 46############################################################ 47 48tests += [ 49 [files('test-libudev.c'), 50 [libshared, 51 libudev_basic]], 52] 53