xref: /dpdk/drivers/common/mlx5/meson.build (revision ca39d3a8)
1# SPDX-License-Identifier: BSD-3-Clause
2# Copyright 2019 Mellanox Technologies, Ltd
3
4if not (is_linux or is_windows)
5	build = false
6	reason = 'only supported on Linux and Windows'
7	subdir_done()
8endif
9
10deps += ['hash', 'pci', 'net', 'eal', 'kvargs']
11sources += files(
12	'mlx5_devx_cmds.c',
13	'mlx5_common.c',
14	'mlx5_common_mp.c',
15	'mlx5_common_mr.c',
16)
17
18cflags_options = [
19	'-std=c11',
20	'-Wno-strict-prototypes',
21	'-D_BSD_SOURCE',
22	'-D_DEFAULT_SOURCE',
23	'-D_XOPEN_SOURCE=600'
24]
25foreach option:cflags_options
26	if cc.has_argument(option)
27		cflags += option
28	endif
29endforeach
30if get_option('buildtype').contains('debug')
31	cflags += [ '-pedantic', '-DPEDANTIC' ]
32else
33	cflags += [ '-UPEDANTIC' ]
34endif
35
36subdir(exec_env)
37