blob: b4d2705b132ec5db24edf00c1b3198bef3430fc1 [file] [log] [blame]
Ben Tyner73ac3682020-01-09 10:46:47 -06001# async gpio monitor needs boost library
2boost_args = ['-DBOOST_ASIO_DISABLE_THREADS',
3 '-DBOOST_ERROR_CODE_HEADER_ONLY',
4 '-DBOOST_SYSTEM_NO_DEPRECATED']
5
Ben Tyner73ac3682020-01-09 10:46:47 -06006# dependency to link gpiod support
7libgpiod = dependency('libgpiod', version : '>=1.4.1')
8
Ben Tyner897a6f72021-07-30 10:59:23 -05009# ENABLE_PHAL_TRUE used in attn_handler.service
10if (get_option('phal').enabled())
11 configuration_data().set('ENABLE_PHAL_TRUE', '')
12else
13 configuration_data().set('ENABLE_PHAL_TRUE', '#')
14endif
15
Ben Tynerdb37c892020-02-19 13:08:48 -060016# install systemd unit file
17configure_file(
18 input: 'attn_handler.service',
19 output: 'attn_handler.service',
20 copy: true,
21 install_dir:
22 dependency('systemd').get_pkgconfig_variable(
23 'systemdsystemunitdir')
24)
Ben Tyner0205f3b2020-02-24 10:24:47 -060025
Ben Tyner9ae5ca42020-02-28 13:13:50 -060026# see if phosphor-logging is available, if not use test case logging code
Ben Tyner13683082020-06-25 12:49:47 -050027if (true == phosphor_logging)
Ben Tynerb1ebfcb2020-05-08 18:52:48 -050028 logging_src = 'attn_logging.cpp'
Ben Tyner9ae5ca42020-02-28 13:13:50 -060029else
30 logging_src = '../test/end2end/logging.cpp'
31endif
32
Zane Shelleyc2528942020-12-02 15:42:42 -060033# Source files.
34attn_src = files(
Ben Tyner188f1092021-02-01 09:33:06 -060035 'attention.cpp',
Ben Tynerbcf65a82020-12-01 08:46:36 -060036 'attn_common.cpp',
Zane Shelleyc2528942020-12-02 15:42:42 -060037 'attn_config.cpp',
Ben Tyner188f1092021-02-01 09:33:06 -060038 'attn_dbus.cpp',
Ben Tyner7029e522021-08-09 19:18:24 -050039 'attn_dump.cpp',
Zane Shelleyc2528942020-12-02 15:42:42 -060040 'attn_handler.cpp',
41 'attn_main.cpp',
42 'attn_monitor.cpp',
43 'bp_handler.cpp',
44 logging_src,
45 'ti_handler.cpp',
Ben Tynerbcf65a82020-12-01 08:46:36 -060046 'vital_handler.cpp',
Zane Shelleyc2528942020-12-02 15:42:42 -060047)
Ben Tyner9ae5ca42020-02-28 13:13:50 -060048
Ben Tynerf5210bb2021-01-05 12:58:10 -060049# for custom/raw PEL creation
50pel_src = files(
Ben Tynerfeeea832021-04-06 10:08:11 -050051 'pel/extended_user_header.cpp',
Ben Tynerf5210bb2021-01-05 12:58:10 -060052 'pel/pel_minimal.cpp',
53 'pel/private_header.cpp',
54 'pel/primary_src.cpp',
55 'pel/user_header.cpp',
56)
57
Zane Shelleyc2528942020-12-02 15:42:42 -060058# Library dependencies.
59attn_deps = [
60 libgpiod,
61 libpdbg_dep,
62 sdbusplus_dep,
63]
64
65# Create static library.
66attn_lib = static_library(
67 'attn_lib',
68 attn_src,
Ben Tynerf5210bb2021-01-05 12:58:10 -060069 pel_src,
Zane Shelleyc2528942020-12-02 15:42:42 -060070 include_directories : incdir,
71 dependencies : attn_deps,
72 cpp_args : [boost_args, test_arg],
73 install : false,
74)