forked from CodeConstruct/mctp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
61 lines (52 loc) · 1.52 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
# SPDX-License-Identifier: GPL-2.0
#
project(
'mctp', 'c',
meson_version: '>= 0.47.0',
version: 'v1.1',
license: 'GPLv2',
default_options: [
'warning_level=2',
],
)
cc = meson.get_compiler('c')
add_project_arguments('-Wno-unused-parameter', language : 'c')
libsystemd = dependency('libsystemd', version: '>=247', required: false)
conf = configuration_data()
conf.set10('HAVE_LINUX_MCTP_H',
cc.has_header('linux/mctp.h'),
description: 'Is linux/mctp.h available?'
)
conf.set10('MCTPD_RECOVER_NIL_UUID',
get_option('unsafe-recover-nil-uuid'),
description: 'Consider a nil UUID to be valid for endpoint recovery purposes',
)
conf.set10('MCTPD_WRITABLE_CONNECTIVITY',
get_option('unsafe-writable-connectivity'),
description: 'Allow writes to the Connectivity member of the au.com.CodeConstruct.MCTP.Endpoint interface on endpoint objects')
config_h = configure_file(
output: 'config.h',
configuration: conf,
)
util_sources = ['src/mctp-util.c']
netlink_sources = ['src/mctp-netlink.c']
executable('mctp',
sources: ['src/mctp.c'] + netlink_sources + util_sources,
install: true,
)
executable('mctp-req',
sources: ['src/mctp-req.c'] + util_sources,
)
executable('mctp-echo',
sources: ['src/mctp-echo.c'] + util_sources,
)
if libsystemd.found()
executable('mctpd',
sources: [
'src/mctpd.c',
] + netlink_sources + util_sources,
dependencies: libsystemd,
install: true,
install_dir: get_option('sbindir'),
)
endif