Zane Shelley | ba5dc16 | 2020-11-09 21:47:55 -0600 | [diff] [blame^] | 1 | # OpenBMC openpower-libhei project, see README.md for details. |
Ben Tyner | 941aaeb | 2019-04-26 17:38:10 -0500 | [diff] [blame] | 2 | project('openpower-libhei', 'cpp', |
Paul Greenwood | dc47e0a | 2019-11-01 16:22:57 -0500 | [diff] [blame] | 3 | version: '0.1', meson_version: '>=0.50.0', |
Ben Tyner | 941aaeb | 2019-04-26 17:38:10 -0500 | [diff] [blame] | 4 | default_options: [ |
| 5 | 'warning_level=3', |
| 6 | 'werror=true', |
Zane Shelley | 83a8d55 | 2020-05-07 15:08:52 -0500 | [diff] [blame] | 7 | 'cpp_std=c++14', |
Ben Tyner | 0fa81f7 | 2019-09-05 14:30:02 -0500 | [diff] [blame] | 8 | 'cpp_args=-Wno-unused-parameter' |
| 9 | ]) |
Ben Tyner | 941aaeb | 2019-04-26 17:38:10 -0500 | [diff] [blame] | 10 | |
Zane Shelley | ba5dc16 | 2020-11-09 21:47:55 -0600 | [diff] [blame^] | 11 | #------------------------------------------------------------------------------- |
| 12 | # libhei library |
| 13 | #------------------------------------------------------------------------------- |
| 14 | |
Ben Tyner | 032bf9e | 2020-05-06 21:27:54 -0500 | [diff] [blame] | 15 | incdir = include_directories('src') |
Ben Tyner | 941aaeb | 2019-04-26 17:38:10 -0500 | [diff] [blame] | 16 | |
Zane Shelley | dd69c96 | 2020-05-05 22:19:11 -0500 | [diff] [blame] | 17 | libhei_src = [ |
| 18 | 'src/chip_data/hei_chip_data.cpp', |
| 19 | 'src/isolator/hei_isolator.cpp', |
| 20 | 'src/isolator/hei_isolation_chip.cpp', |
| 21 | 'src/isolator/hei_isolation_node.cpp', |
| 22 | 'src/register/hei_hardware_register.cpp', |
| 23 | 'src/util/hei_bit_string.cpp', |
| 24 | ] |
Ben Tyner | 7c79605 | 2020-02-03 19:00:37 -0600 | [diff] [blame] | 25 | |
| 26 | libhei_dep = declare_dependency(include_directories : incdir, |
| 27 | sources : libhei_src) |
| 28 | |
Ben Tyner | 032bf9e | 2020-05-06 21:27:54 -0500 | [diff] [blame] | 29 | # build static library libhei.a (note that the libray name is hei, the |
| 30 | # resulting filename will be libhei.a) |
| 31 | libhei_static = static_library('hei', |
| 32 | dependencies: libhei_dep, |
| 33 | install: true) |
| 34 | |
Zane Shelley | 3a02e24 | 2020-05-08 16:25:36 -0500 | [diff] [blame] | 35 | install_headers( |
| 36 | 'src/hei_chip.hpp', |
| 37 | 'src/hei_isolation_data.hpp', |
| 38 | 'src/hei_main.hpp', |
| 39 | 'src/hei_signature.hpp', |
| 40 | 'src/hei_types.hpp', |
| 41 | 'src/hei_user_interface.hpp', |
| 42 | subdir : 'libhei' |
| 43 | ) |
Ben Tyner | 032bf9e | 2020-05-06 21:27:54 -0500 | [diff] [blame] | 44 | |
| 45 | pkg_mod = import('pkgconfig') |
| 46 | |
| 47 | pkg_mod.generate(libraries : libhei_static, |
| 48 | version : '0.1', |
| 49 | name : 'libhei', |
| 50 | subdirs: 'libhei', |
| 51 | filebase : 'hei', |
| 52 | description : 'Openpower Hardware Error Isolator') |
| 53 | |
Zane Shelley | ba5dc16 | 2020-11-09 21:47:55 -0600 | [diff] [blame^] | 54 | #------------------------------------------------------------------------------- |
| 55 | # Chip Data Files |
| 56 | #------------------------------------------------------------------------------- |
| 57 | |
| 58 | subdir('xml') |
| 59 | |
| 60 | #------------------------------------------------------------------------------- |
| 61 | # Test |
| 62 | #------------------------------------------------------------------------------- |
| 63 | |
Zane Shelley | ad103b9 | 2019-07-31 15:57:54 -0500 | [diff] [blame] | 64 | build_tests = get_option('tests') |
Ben Tyner | 941aaeb | 2019-04-26 17:38:10 -0500 | [diff] [blame] | 65 | |
Zane Shelley | ad103b9 | 2019-07-31 15:57:54 -0500 | [diff] [blame] | 66 | if not build_tests.disabled() |
Zane Shelley | ad103b9 | 2019-07-31 15:57:54 -0500 | [diff] [blame] | 67 | subdir('test') |
Ben Tyner | 941aaeb | 2019-04-26 17:38:10 -0500 | [diff] [blame] | 68 | endif |
Zane Shelley | ba5dc16 | 2020-11-09 21:47:55 -0600 | [diff] [blame^] | 69 | |