blob: 5359e9772ae9af29e1fd2323d50775e7d05706be [file] [log] [blame]
Ben Tyner941aaeb2019-04-26 17:38:10 -05001project('openpower-libhei', 'cpp',
Paul Greenwooddc47e0a2019-11-01 16:22:57 -05002 version: '0.1', meson_version: '>=0.50.0',
Ben Tyner941aaeb2019-04-26 17:38:10 -05003 default_options: [
4 'warning_level=3',
5 'werror=true',
Zane Shelley83a8d552020-05-07 15:08:52 -05006 'cpp_std=c++14',
Ben Tyner0fa81f72019-09-05 14:30:02 -05007 'cpp_args=-Wno-unused-parameter'
8 ])
Ben Tyner941aaeb2019-04-26 17:38:10 -05009
Ben Tyner032bf9e2020-05-06 21:27:54 -050010incdir = include_directories('src')
Ben Tyner941aaeb2019-04-26 17:38:10 -050011
Ben Tyner7c796052020-02-03 19:00:37 -060012libhei_src = ['src/isolator/hei_isolator.cpp',
13 'src/isolator/hei_isolation_node.cpp',
14 'src/register/hei_hardware_register.cpp',
15 'src/util/hei_bit_string.cpp']
16
17libhei_dep = declare_dependency(include_directories : incdir,
18 sources : libhei_src)
19
Ben Tyner032bf9e2020-05-06 21:27:54 -050020# build static library libhei.a (note that the libray name is hei, the
21# resulting filename will be libhei.a)
22libhei_static = static_library('hei',
23 dependencies: libhei_dep,
24 install: true)
25
26install_headers('src/hei_chip.hpp',
27 'src/hei_includes.hpp',
28 'src/hei_isolation_data.hpp',
29 'src/hei_macros.hpp',
30 'src/hei_main.hpp',
31 'src/hei_return_code.hpp',
32 'src/hei_types.hpp',
33 'src/hei_user_interface.hpp',
34 subdir : 'libhei')
35
36install_headers('src/isolator/hei_signature.hpp',
37 'src/isolator/hei_isolator.hpp',
38 'src/isolator/hei_isolation_node.hpp',
39 subdir : 'libhei/isolator')
40
41install_headers('src/register/hei_hardware_register.hpp',
42 'src/register/hei_operator_register.hpp',
43 'src/register/hei_scom_register.hpp',
44 'src/register/hei_register.hpp',
45 subdir : 'libhei/register')
46
47install_headers('src/util/hei_bit_string.hpp',
48 'src/util/hei_flyweight.hpp',
49 subdir : 'libhei/util')
50
51pkg_mod = import('pkgconfig')
52
53pkg_mod.generate(libraries : libhei_static,
54 version : '0.1',
55 name : 'libhei',
56 subdirs: 'libhei',
57 filebase : 'hei',
58 description : 'Openpower Hardware Error Isolator')
59
Zane Shelleyad103b92019-07-31 15:57:54 -050060build_tests = get_option('tests')
Ben Tyner941aaeb2019-04-26 17:38:10 -050061
Zane Shelleyad103b92019-07-31 15:57:54 -050062if not build_tests.disabled()
Zane Shelleyad103b92019-07-31 15:57:54 -050063 subdir('test')
Ben Tyner941aaeb2019-04-26 17:38:10 -050064endif