1# async gpio monitor needs boost library 2boost_args = [ 3 '-DBOOST_ASIO_DISABLE_THREADS', 4 '-DBOOST_ERROR_CODE_HEADER_ONLY', 5 '-DBOOST_SYSTEM_NO_DEPRECATED', 6] 7 8# dependency to link gpiod support 9libgpiod = dependency('libgpiod', version: '>=1.4.1') 10 11# get openpower-hw-diags build configuration 12attn_conf = configuration_data() 13 14# conditionally define ENABLE_PHAL_TRUE 15if (get_option('phal').allowed()) 16 attn_conf.set('ENABLE_PHAL_TRUE', '') 17else 18 attn_conf.set('ENABLE_PHAL_TRUE', '#') 19endif 20 21# attention handler default config override 22attn_conf.set('ATTN_CONFIG', get_option('attn_config')) 23 24# install attention handler unit file 25configure_file( 26 configuration: attn_conf, 27 input: 'attn_handler.service.in', 28 output: 'attn_handler.service', 29 install: true, 30 install_dir: dependency('systemd').get_variable('systemdsystemunitdir'), 31) 32 33# install attention handler config file 34configure_file( 35 configuration: attn_conf, 36 input: 'attn_config.in', 37 output: 'attn_config', 38 install: true, 39 install_dir: join_paths(get_option('sysconfdir'), 'default'), 40) 41 42# Source files. 43attn_src = files( 44 'attention.cpp', 45 'attn_common.cpp', 46 'attn_config.cpp', 47 'attn_dbus.cpp', 48 'attn_dump.cpp', 49 'attn_handler.cpp', 50 'attn_logging.cpp', 51 'attn_main.cpp', 52 'attn_monitor.cpp', 53 'bp_handler.cpp', 54 'ti_handler.cpp', 55 'vital_handler.cpp', 56) 57 58# for custom/raw PEL creation 59pel_src = files( 60 'pel/extended_user_header.cpp', 61 'pel/pel_minimal.cpp', 62 'pel/primary_src.cpp', 63 'pel/private_header.cpp', 64 'pel/user_header.cpp', 65) 66 67# Library dependencies. 68attn_deps = [libgpiod, libpdbg_dep, phosphor_logging_dep, sdbusplus_dep] 69 70# conditional library dependencies 71if get_option('phal').allowed() 72 attn_deps += libphal_dep 73endif 74 75# Create static library. 76attn_lib = static_library( 77 'attn_lib', 78 attn_src, 79 pel_src, 80 include_directories: incdir, 81 dependencies: attn_deps, 82 cpp_args: [boost_args], 83 install: false, 84) 85