blob: 02cd994226f564dfbd83ef7cf7af453a902ca9d3 [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#-------------------------------------------------------------------------------
Ben Tyner552992a2021-04-15 10:57:17 -050011# Versioning
12#-------------------------------------------------------------------------------
13buildinfo = vcs_tag(command: ['git', 'describe', '--always', '--long'],
14 input: 'buildinfo.hpp.in',
15 output: 'buildinfo.hpp',
16 replace_string:'@BUILDINFO@',
17 fallback: '0')
18
19#-------------------------------------------------------------------------------
Zane Shelleyba5dc162020-11-09 21:47:55 -060020# libhei library
21#-------------------------------------------------------------------------------
22
Ben Tyner032bf9e2020-05-06 21:27:54 -050023incdir = include_directories('src')
Ben Tyner941aaeb2019-04-26 17:38:10 -050024
Zane Shelleydd69c962020-05-05 22:19:11 -050025libhei_src = [
26 'src/chip_data/hei_chip_data.cpp',
27 'src/isolator/hei_isolator.cpp',
28 'src/isolator/hei_isolation_chip.cpp',
29 'src/isolator/hei_isolation_node.cpp',
30 'src/register/hei_hardware_register.cpp',
31 'src/util/hei_bit_string.cpp',
32]
Ben Tyner7c796052020-02-03 19:00:37 -060033
34libhei_dep = declare_dependency(include_directories : incdir,
Ben Tyner552992a2021-04-15 10:57:17 -050035 sources : [libhei_src, buildinfo])
Ben Tyner7c796052020-02-03 19:00:37 -060036
Ben Tyner032bf9e2020-05-06 21:27:54 -050037# build static library libhei.a (note that the libray name is hei, the
38# resulting filename will be libhei.a)
39libhei_static = static_library('hei',
40 dependencies: libhei_dep,
41 install: true)
42
Zane Shelley3a02e242020-05-08 16:25:36 -050043install_headers(
44 'src/hei_chip.hpp',
45 'src/hei_isolation_data.hpp',
46 'src/hei_main.hpp',
47 'src/hei_signature.hpp',
48 'src/hei_types.hpp',
49 'src/hei_user_interface.hpp',
50 subdir : 'libhei'
51)
Ben Tyner032bf9e2020-05-06 21:27:54 -050052
Zane Shelley995be6c2021-02-24 15:48:55 -060053install_headers(
54 'src/util/hei_bit_string.hpp',
55 'src/util/hei_flyweight.hpp',
56 subdir : 'libhei/util'
57)
58
Ben Tyner032bf9e2020-05-06 21:27:54 -050059pkg_mod = import('pkgconfig')
60
61pkg_mod.generate(libraries : libhei_static,
62 version : '0.1',
63 name : 'libhei',
64 subdirs: 'libhei',
65 filebase : 'hei',
66 description : 'Openpower Hardware Error Isolator')
67
Zane Shelleyba5dc162020-11-09 21:47:55 -060068#-------------------------------------------------------------------------------
69# Chip Data Files
70#-------------------------------------------------------------------------------
71
72subdir('xml')
73
74#-------------------------------------------------------------------------------
75# Test
76#-------------------------------------------------------------------------------
77
Zane Shelleyad103b92019-07-31 15:57:54 -050078build_tests = get_option('tests')
Ben Tyner941aaeb2019-04-26 17:38:10 -050079
Zane Shelleyad103b92019-07-31 15:57:54 -050080if not build_tests.disabled()
Zane Shelleyad103b92019-07-31 15:57:54 -050081 subdir('test')
Ben Tyner941aaeb2019-04-26 17:38:10 -050082endif
Zane Shelleyba5dc162020-11-09 21:47:55 -060083