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