common/mlx5: introduce layer for multiple class drivers
[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
5         build = false
6         reason = 'only supported on Linux'
7         subdir_done()
8 endif
9
10 config_flag_fmt = 'RTE_LIBRTE_@0@_COMMON'
11 driver_name_fmt = 'rte_common_@0@'
12 deps += ['hash', 'pci', 'bus_pci', 'net', 'eal', 'kvargs']
13 sources += files(
14         'mlx5_devx_cmds.c',
15         'mlx5_common.c',
16         'mlx5_common_mp.c',
17         'mlx5_common_mr.c',
18         'mlx5_malloc.c',
19         'mlx5_common_pci.c',
20 )
21
22 cflags_options = [
23         '-std=c11',
24         '-Wno-strict-prototypes',
25         '-D_BSD_SOURCE',
26         '-D_DEFAULT_SOURCE',
27         '-D_XOPEN_SOURCE=600'
28 ]
29 foreach option:cflags_options
30         if cc.has_argument(option)
31                 cflags += option
32         endif
33 endforeach
34 if get_option('buildtype').contains('debug')
35         cflags += [ '-pedantic', '-DPEDANTIC' ]
36 else
37         cflags += [ '-UPEDANTIC' ]
38 endif
39
40 subdir(exec_env)