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 | db37c89 | 2020-02-19 13:08:48 -0600 | [diff] [blame] | 9 | # install systemd unit file |
| 10 | configure_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 Tyner | 0205f3b | 2020-02-24 10:24:47 -0600 | [diff] [blame] | 18 | |
Ben Tyner | 9ae5ca4 | 2020-02-28 13:13:50 -0600 | [diff] [blame] | 19 | # 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] | 20 | if (true == phosphor_logging) |
Ben Tyner | b1ebfcb | 2020-05-08 18:52:48 -0500 | [diff] [blame] | 21 | logging_src = 'attn_logging.cpp' |
Ben Tyner | 9ae5ca4 | 2020-02-28 13:13:50 -0600 | [diff] [blame] | 22 | else |
| 23 | logging_src = '../test/end2end/logging.cpp' |
| 24 | endif |
| 25 | |
Zane Shelley | c252894 | 2020-12-02 15:42:42 -0600 | [diff] [blame] | 26 | # Source files. |
| 27 | attn_src = files( |
Ben Tyner | 188f109 | 2021-02-01 09:33:06 -0600 | [diff] [blame] | 28 | 'attention.cpp', |
Ben Tyner | bcf65a8 | 2020-12-01 08:46:36 -0600 | [diff] [blame] | 29 | 'attn_common.cpp', |
Zane Shelley | c252894 | 2020-12-02 15:42:42 -0600 | [diff] [blame] | 30 | 'attn_config.cpp', |
Ben Tyner | 188f109 | 2021-02-01 09:33:06 -0600 | [diff] [blame] | 31 | 'attn_dbus.cpp', |
Zane Shelley | c252894 | 2020-12-02 15:42:42 -0600 | [diff] [blame] | 32 | 'attn_handler.cpp', |
| 33 | 'attn_main.cpp', |
| 34 | 'attn_monitor.cpp', |
| 35 | 'bp_handler.cpp', |
| 36 | logging_src, |
| 37 | 'ti_handler.cpp', |
Ben Tyner | bcf65a8 | 2020-12-01 08:46:36 -0600 | [diff] [blame] | 38 | 'vital_handler.cpp', |
Zane Shelley | c252894 | 2020-12-02 15:42:42 -0600 | [diff] [blame] | 39 | ) |
Ben Tyner | 9ae5ca4 | 2020-02-28 13:13:50 -0600 | [diff] [blame] | 40 | |
Ben Tyner | f5210bb | 2021-01-05 12:58:10 -0600 | [diff] [blame] | 41 | # for custom/raw PEL creation |
| 42 | pel_src = files( |
| 43 | 'pel/pel_minimal.cpp', |
| 44 | 'pel/private_header.cpp', |
| 45 | 'pel/primary_src.cpp', |
| 46 | 'pel/user_header.cpp', |
| 47 | ) |
| 48 | |
Zane Shelley | c252894 | 2020-12-02 15:42:42 -0600 | [diff] [blame] | 49 | # Library dependencies. |
| 50 | attn_deps = [ |
| 51 | libgpiod, |
| 52 | libpdbg_dep, |
| 53 | sdbusplus_dep, |
| 54 | ] |
| 55 | |
| 56 | # Create static library. |
| 57 | attn_lib = static_library( |
| 58 | 'attn_lib', |
| 59 | attn_src, |
Ben Tyner | f5210bb | 2021-01-05 12:58:10 -0600 | [diff] [blame] | 60 | pel_src, |
Zane Shelley | c252894 | 2020-12-02 15:42:42 -0600 | [diff] [blame] | 61 | include_directories : incdir, |
| 62 | dependencies : attn_deps, |
| 63 | cpp_args : [boost_args, test_arg], |
| 64 | install : false, |
| 65 | ) |