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