-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
85 lines (69 loc) · 2.62 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# OpenBMC openpower-libhei project, see README.md for details.
project('openpower-libhei', 'cpp',
version: '0.1', meson_version: '>=0.51.0',
default_options: [
'warning_level=3',
'werror=true',
'cpp_std=c++14',
])
#-------------------------------------------------------------------------------
# Versioning
#-------------------------------------------------------------------------------
buildinfo = vcs_tag(command: ['git', 'describe', '--always', '--long'],
input: 'buildinfo.hpp.in',
output: 'buildinfo.hpp',
replace_string:'@BUILDINFO@',
fallback: '0')
#-------------------------------------------------------------------------------
# libhei library
#-------------------------------------------------------------------------------
incdir = include_directories('src')
libhei_src = [
'src/chip_data/hei_chip_data.cpp',
'src/isolator/hei_isolator.cpp',
'src/isolator/hei_isolation_chip.cpp',
'src/isolator/hei_isolation_node.cpp',
'src/register/hei_hardware_register.cpp',
'src/util/hei_bit_string.cpp',
]
libhei_dep = declare_dependency(include_directories : incdir,
sources : [libhei_src, buildinfo])
# build static library libhei.a (note that the libray name is hei, the
# resulting filename will be libhei.a)
libhei_static = static_library('hei',
dependencies: libhei_dep,
install: true)
install_headers(
'src/hei_buildinfo.hpp',
'src/hei_chip.hpp',
'src/hei_isolation_data.hpp',
'src/hei_main.hpp',
'src/hei_signature.hpp',
'src/hei_types.hpp',
'src/hei_user_interface.hpp',
'src/hei_util.hpp',
subdir : 'libhei'
)
install_headers(
'src/util/hei_bit_string.hpp',
'src/util/hei_flyweight.hpp',
subdir : 'libhei/util'
)
pkg_mod = import('pkgconfig')
pkg_mod.generate(libraries : libhei_static,
version : '0.1',
name : 'libhei',
subdirs: 'libhei',
filebase : 'hei',
description : 'Openpower Hardware Error Isolator')
#-------------------------------------------------------------------------------
# Chip Data Files
#-------------------------------------------------------------------------------
subdir('chip_data')
#-------------------------------------------------------------------------------
# Test
#-------------------------------------------------------------------------------
build_tests = get_option('tests')
if not build_tests.disabled()
subdir('test')
endif