blob: 3b085af6b2c3c9a23c53b5744a33001fcb3da1ca [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 Tynerdb37c892020-02-19 13:08:48 -06009# install systemd unit file
10configure_file(
11 input: 'attn_handler.service',
12 output: 'attn_handler.service',
13 copy: true,
14 install_dir:
15 dependency('systemd').get_pkgconfig_variable(
16 'systemdsystemunitdir')
17)
Ben Tyner0205f3b2020-02-24 10:24:47 -060018
Ben Tyner9ae5ca42020-02-28 13:13:50 -060019# see if phosphor-logging is available, if not use test case logging code
Ben Tyner13683082020-06-25 12:49:47 -050020if (true == phosphor_logging)
Ben Tynerb1ebfcb2020-05-08 18:52:48 -050021 logging_src = 'attn_logging.cpp'
Ben Tyner9ae5ca42020-02-28 13:13:50 -060022else
23 logging_src = '../test/end2end/logging.cpp'
24endif
25
Zane Shelleyc2528942020-12-02 15:42:42 -060026# Source files.
27attn_src = files(
Ben Tyner188f1092021-02-01 09:33:06 -060028 'attention.cpp',
Ben Tynerbcf65a82020-12-01 08:46:36 -060029 'attn_common.cpp',
Zane Shelleyc2528942020-12-02 15:42:42 -060030 'attn_config.cpp',
Ben Tyner188f1092021-02-01 09:33:06 -060031 'attn_dbus.cpp',
Zane Shelleyc2528942020-12-02 15:42:42 -060032 'attn_handler.cpp',
33 'attn_main.cpp',
34 'attn_monitor.cpp',
35 'bp_handler.cpp',
36 logging_src,
37 'ti_handler.cpp',
Ben Tynerbcf65a82020-12-01 08:46:36 -060038 'vital_handler.cpp',
Zane Shelleyc2528942020-12-02 15:42:42 -060039)
Ben Tyner9ae5ca42020-02-28 13:13:50 -060040
Ben Tynerf5210bb2021-01-05 12:58:10 -060041# for custom/raw PEL creation
42pel_src = files(
Ben Tynerfeeea832021-04-06 10:08:11 -050043 'pel/extended_user_header.cpp',
Ben Tynerf5210bb2021-01-05 12:58:10 -060044 'pel/pel_minimal.cpp',
45 'pel/private_header.cpp',
46 'pel/primary_src.cpp',
47 'pel/user_header.cpp',
48)
49
Zane Shelleyc2528942020-12-02 15:42:42 -060050# Library dependencies.
51attn_deps = [
52 libgpiod,
53 libpdbg_dep,
54 sdbusplus_dep,
55]
56
57# Create static library.
58attn_lib = static_library(
59 'attn_lib',
60 attn_src,
Ben Tynerf5210bb2021-01-05 12:58:10 -060061 pel_src,
Zane Shelleyc2528942020-12-02 15:42:42 -060062 include_directories : incdir,
63 dependencies : attn_deps,
64 cpp_args : [boost_args, test_arg],
65 install : false,
66)