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_variable(pkgconfig: 'systemdsystemunitdir') 26) 27 28# see if phosphor-logging is available, if not use test case logging code 29if (true == phosphor_logging) 30 logging_src = 'attn_logging.cpp' 31else 32 logging_src = '../test/end2end/logging.cpp' 33endif 34 35# Source files. 36attn_src = files( 37 'attention.cpp', 38 'attn_common.cpp', 39 'attn_config.cpp', 40 'attn_dbus.cpp', 41 'attn_dump.cpp', 42 'attn_handler.cpp', 43 'attn_main.cpp', 44 'attn_monitor.cpp', 45 'bp_handler.cpp', 46 logging_src, 47 'ti_handler.cpp', 48 'vital_handler.cpp', 49) 50 51# for custom/raw PEL creation 52pel_src = files( 53 'pel/extended_user_header.cpp', 54 'pel/pel_minimal.cpp', 55 'pel/private_header.cpp', 56 'pel/primary_src.cpp', 57 'pel/user_header.cpp', 58) 59 60# Library dependencies. 61attn_deps = [ 62 libgpiod, 63 libpdbg_dep, 64 sdbusplus_dep, 65] 66 67# conditional library dependencies 68if get_option('phal').enabled() 69 attn_deps += libphal_dep 70endif 71 72# Create static library. 73attn_lib = static_library( 74 'attn_lib', 75 attn_src, 76 pel_src, 77 include_directories : incdir, 78 dependencies : attn_deps, 79 cpp_args : [boost_args, test_arg], 80 install : false, 81) 82