xref: /dpdk/drivers/vdpa/mlx5/meson.build (revision e9cc7c7abc55ece4ebe2ce73b68b22f5c6049c86)
1# SPDX-License-Identifier: BSD-3-Clause
2# Copyright 2019 Mellanox Technologies, Ltd
3
4if not is_linux
5    build = false
6    reason = 'only supported on Linux'
7    subdir_done()
8endif
9
10deps += ['hash', 'common_mlx5', 'vhost', 'pci', 'eal', 'sched']
11if not dpdk_conf.has('RTE_COMMON_MLX5')
12    # avoid referencing undefined variables from common/mlx5
13    subdir_done()
14endif
15
16sources = files(
17        'mlx5_vdpa.c',
18        'mlx5_vdpa_mem.c',
19        'mlx5_vdpa_event.c',
20        'mlx5_vdpa_virtq.c',
21        'mlx5_vdpa_steer.c',
22        'mlx5_vdpa_lm.c',
23        'mlx5_vdpa_cthread.c',
24)
25cflags_options = [
26        '-std=c11',
27        '-Wno-strict-prototypes',
28        '-D_BSD_SOURCE',
29        '-D_DEFAULT_SOURCE',
30        '-D_XOPEN_SOURCE=600',
31]
32foreach option:cflags_options
33    if cc.has_argument(option)
34        cflags += option
35    endif
36endforeach
37
38if get_option('buildtype').contains('debug')
39    cflags += [ '-pedantic', '-DPEDANTIC' ]
40else
41    cflags += [ '-UPEDANTIC' ]
42endif
43