Ben Tyner | 73ac368 | 2020-01-09 10:46:47 -0600 | [diff] [blame] | 1 | # async gpio monitor needs boost library |
| 2 | boost_args = ['-DBOOST_ASIO_DISABLE_THREADS', |
| 3 | '-DBOOST_ERROR_CODE_HEADER_ONLY', |
| 4 | '-DBOOST_SYSTEM_NO_DEPRECATED'] |
| 5 | |
Ben Tyner | 73ac368 | 2020-01-09 10:46:47 -0600 | [diff] [blame] | 6 | # dependency to link gpiod support |
| 7 | libgpiod = dependency('libgpiod', version : '>=1.4.1') |
| 8 | |
Ben Tyner | 897a6f7 | 2021-07-30 10:59:23 -0500 | [diff] [blame] | 9 | # ENABLE_PHAL_TRUE used in attn_handler.service |
| 10 | if (get_option('phal').enabled()) |
| 11 | configuration_data().set('ENABLE_PHAL_TRUE', '') |
| 12 | else |
| 13 | configuration_data().set('ENABLE_PHAL_TRUE', '#') |
| 14 | endif |
| 15 | |
Ben Tyner | db37c89 | 2020-02-19 13:08:48 -0600 | [diff] [blame] | 16 | # install systemd unit file |
| 17 | configure_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 Tyner | 0205f3b | 2020-02-24 10:24:47 -0600 | [diff] [blame] | 25 | |
Ben Tyner | 9ae5ca4 | 2020-02-28 13:13:50 -0600 | [diff] [blame] | 26 | # see if phosphor-logging is available, if not use test case logging code |
Ben Tyner | 1368308 | 2020-06-25 12:49:47 -0500 | [diff] [blame] | 27 | if (true == phosphor_logging) |
Ben Tyner | b1ebfcb | 2020-05-08 18:52:48 -0500 | [diff] [blame] | 28 | logging_src = 'attn_logging.cpp' |
Ben Tyner | 9ae5ca4 | 2020-02-28 13:13:50 -0600 | [diff] [blame] | 29 | else |
| 30 | logging_src = '../test/end2end/logging.cpp' |
| 31 | endif |
| 32 | |
Zane Shelley | c252894 | 2020-12-02 15:42:42 -0600 | [diff] [blame] | 33 | # Source files. |
| 34 | attn_src = files( |
Ben Tyner | 188f109 | 2021-02-01 09:33:06 -0600 | [diff] [blame] | 35 | 'attention.cpp', |
Ben Tyner | bcf65a8 | 2020-12-01 08:46:36 -0600 | [diff] [blame] | 36 | 'attn_common.cpp', |
Zane Shelley | c252894 | 2020-12-02 15:42:42 -0600 | [diff] [blame] | 37 | 'attn_config.cpp', |
Ben Tyner | 188f109 | 2021-02-01 09:33:06 -0600 | [diff] [blame] | 38 | 'attn_dbus.cpp', |
Zane Shelley | c252894 | 2020-12-02 15:42:42 -0600 | [diff] [blame] | 39 | 'attn_handler.cpp', |
| 40 | 'attn_main.cpp', |
| 41 | 'attn_monitor.cpp', |
| 42 | 'bp_handler.cpp', |
| 43 | logging_src, |
| 44 | 'ti_handler.cpp', |
Ben Tyner | bcf65a8 | 2020-12-01 08:46:36 -0600 | [diff] [blame] | 45 | 'vital_handler.cpp', |
Zane Shelley | c252894 | 2020-12-02 15:42:42 -0600 | [diff] [blame] | 46 | ) |
Ben Tyner | 9ae5ca4 | 2020-02-28 13:13:50 -0600 | [diff] [blame] | 47 | |
Ben Tyner | f5210bb | 2021-01-05 12:58:10 -0600 | [diff] [blame] | 48 | # for custom/raw PEL creation |
| 49 | pel_src = files( |
Ben Tyner | feeea83 | 2021-04-06 10:08:11 -0500 | [diff] [blame] | 50 | 'pel/extended_user_header.cpp', |
Ben Tyner | f5210bb | 2021-01-05 12:58:10 -0600 | [diff] [blame] | 51 | 'pel/pel_minimal.cpp', |
| 52 | 'pel/private_header.cpp', |
| 53 | 'pel/primary_src.cpp', |
| 54 | 'pel/user_header.cpp', |
| 55 | ) |
| 56 | |
Zane Shelley | c252894 | 2020-12-02 15:42:42 -0600 | [diff] [blame] | 57 | # Library dependencies. |
| 58 | attn_deps = [ |
| 59 | libgpiod, |
| 60 | libpdbg_dep, |
| 61 | sdbusplus_dep, |
| 62 | ] |
| 63 | |
| 64 | # Create static library. |
| 65 | attn_lib = static_library( |
| 66 | 'attn_lib', |
| 67 | attn_src, |
Ben Tyner | f5210bb | 2021-01-05 12:58:10 -0600 | [diff] [blame] | 68 | pel_src, |
Zane Shelley | c252894 | 2020-12-02 15:42:42 -0600 | [diff] [blame] | 69 | include_directories : incdir, |
| 70 | dependencies : attn_deps, |
| 71 | cpp_args : [boost_args, test_arg], |
| 72 | install : false, |
| 73 | ) |