blob: 48834c10beefac17821393b5e49e8808b6fecc3f [file] [log] [blame]
Zane Shelleyba5dc162020-11-09 21:47:55 -06001# OpenBMC openpower-libhei project, see README.md for details.
Ben Tyner941aaeb2019-04-26 17:38:10 -05002project('openpower-libhei', 'cpp',
Paul Greenwooddc47e0a2019-11-01 16:22:57 -05003 version: '0.1', meson_version: '>=0.50.0',
Ben Tyner941aaeb2019-04-26 17:38:10 -05004 default_options: [
5 'warning_level=3',
6 'werror=true',
Zane Shelley83a8d552020-05-07 15:08:52 -05007 'cpp_std=c++14',
Ben Tyner0fa81f72019-09-05 14:30:02 -05008 ])
Ben Tyner941aaeb2019-04-26 17:38:10 -05009
Zane Shelleyba5dc162020-11-09 21:47:55 -060010#-------------------------------------------------------------------------------
11# libhei library
12#-------------------------------------------------------------------------------
13
Ben Tyner032bf9e2020-05-06 21:27:54 -050014incdir = include_directories('src')
Ben Tyner941aaeb2019-04-26 17:38:10 -050015
Zane Shelleydd69c962020-05-05 22:19:11 -050016libhei_src = [
17 'src/chip_data/hei_chip_data.cpp',
18 'src/isolator/hei_isolator.cpp',
19 'src/isolator/hei_isolation_chip.cpp',
20 'src/isolator/hei_isolation_node.cpp',
21 'src/register/hei_hardware_register.cpp',
22 'src/util/hei_bit_string.cpp',
23]
Ben Tyner7c796052020-02-03 19:00:37 -060024
25libhei_dep = declare_dependency(include_directories : incdir,
26 sources : libhei_src)
27
Ben Tyner032bf9e2020-05-06 21:27:54 -050028# build static library libhei.a (note that the libray name is hei, the
29# resulting filename will be libhei.a)
30libhei_static = static_library('hei',
31 dependencies: libhei_dep,
32 install: true)
33
Zane Shelley3a02e242020-05-08 16:25:36 -050034install_headers(
35 'src/hei_chip.hpp',
36 'src/hei_isolation_data.hpp',
37 'src/hei_main.hpp',
38 'src/hei_signature.hpp',
39 'src/hei_types.hpp',
40 'src/hei_user_interface.hpp',
41 subdir : 'libhei'
42)
Ben Tyner032bf9e2020-05-06 21:27:54 -050043
Zane Shelley995be6c2021-02-24 15:48:55 -060044install_headers(
45 'src/util/hei_bit_string.hpp',
46 'src/util/hei_flyweight.hpp',
47 subdir : 'libhei/util'
48)
49
Ben Tyner032bf9e2020-05-06 21:27:54 -050050pkg_mod = import('pkgconfig')
51
52pkg_mod.generate(libraries : libhei_static,
53 version : '0.1',
54 name : 'libhei',
55 subdirs: 'libhei',
56 filebase : 'hei',
57 description : 'Openpower Hardware Error Isolator')
58
Zane Shelleyba5dc162020-11-09 21:47:55 -060059#-------------------------------------------------------------------------------
60# Chip Data Files
61#-------------------------------------------------------------------------------
62
63subdir('xml')
64
65#-------------------------------------------------------------------------------
66# Test
67#-------------------------------------------------------------------------------
68
Zane Shelleyad103b92019-07-31 15:57:54 -050069build_tests = get_option('tests')
Ben Tyner941aaeb2019-04-26 17:38:10 -050070
Zane Shelleyad103b92019-07-31 15:57:54 -050071if not build_tests.disabled()
Zane Shelleyad103b92019-07-31 15:57:54 -050072 subdir('test')
Ben Tyner941aaeb2019-04-26 17:38:10 -050073endif
Zane Shelleyba5dc162020-11-09 21:47:55 -060074