xref: /dpdk/drivers/common/mlx5/meson.build (revision 777b72a9)
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', 'bus_auxiliary', '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        'mlx5_common_utils.c',
20)
21
22cflags_options = [
23        '-std=c11',
24        '-Wno-strict-prototypes',
25        '-D_BSD_SOURCE',
26        '-D_DEFAULT_SOURCE',
27        '-D_XOPEN_SOURCE=600',
28]
29foreach option:cflags_options
30    if cc.has_argument(option)
31        cflags += option
32    endif
33endforeach
34if get_option('buildtype').contains('debug')
35    cflags += [ '-pedantic', '-DPEDANTIC' ]
36else
37    cflags += [ '-UPEDANTIC' ]
38endif
39
40subdir(exec_env)
41