xref: /dpdk/drivers/common/mlx5/meson.build (revision 68a03efeed657e6e05f281479b33b51102797e15)
1# SPDX-License-Identifier: BSD-3-Clause
2# Copyright 2019 Mellanox Technologies, Ltd
3
4if not (is_linux or (is_windows and is_ms_linker))
5	build = false
6	reason = 'only supported on Linux and Windows build with clang'
7	subdir_done()
8endif
9
10deps += ['hash', 'pci', 'bus_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	'mlx5_malloc.c',
17	'mlx5_common_pci.c',
18	'mlx5_common_devx.c',
19)
20
21cflags_options = [
22	'-std=c11',
23	'-Wno-strict-prototypes',
24	'-D_BSD_SOURCE',
25	'-D_DEFAULT_SOURCE',
26	'-D_XOPEN_SOURCE=600'
27]
28foreach option:cflags_options
29	if cc.has_argument(option)
30		cflags += option
31	endif
32endforeach
33if get_option('buildtype').contains('debug')
34	cflags += [ '-pedantic', '-DPEDANTIC' ]
35else
36	cflags += [ '-UPEDANTIC' ]
37endif
38
39subdir(exec_env)
40