xref: /dpdk/drivers/net/mlx5/meson.build (revision d0b8a4e1)
1# SPDX-License-Identifier: BSD-3-Clause
2# Copyright 2018 6WIND S.A.
3# Copyright 2018 Mellanox Technologies, Ltd
4
5if not (is_linux or is_windows)
6    build = false
7    reason = 'only supported on Linux and Windows'
8    subdir_done()
9endif
10
11deps += ['hash', 'common_mlx5']
12headers = files('rte_pmd_mlx5.h')
13sources = files(
14        'mlx5.c',
15        'mlx5_ethdev.c',
16        'mlx5_flow.c',
17        'mlx5_flow_meter.c',
18        'mlx5_flow_dv.c',
19        'mlx5_flow_aso.c',
20        'mlx5_flow_flex.c',
21        'mlx5_mac.c',
22        'mlx5_rss.c',
23        'mlx5_rx.c',
24        'mlx5_rxmode.c',
25        'mlx5_rxq.c',
26        'mlx5_rxtx.c',
27        'mlx5_stats.c',
28        'mlx5_trigger.c',
29        'mlx5_tx.c',
30        'mlx5_tx_empw.c',
31        'mlx5_tx_mpw.c',
32        'mlx5_tx_nompw.c',
33        'mlx5_tx_txpp.c',
34        'mlx5_txq.c',
35        'mlx5_txpp.c',
36        'mlx5_vlan.c',
37        'mlx5_utils.c',
38        'mlx5_devx.c',
39)
40
41if is_linux
42    sources += files(
43            'mlx5_flow_verbs.c',
44    )
45    if (dpdk_conf.has('RTE_ARCH_X86_64')
46        or dpdk_conf.has('RTE_ARCH_ARM64')
47        or dpdk_conf.has('RTE_ARCH_PPC_64'))
48        sources += files('mlx5_rxtx_vec.c')
49    endif
50endif
51
52cflags_options = [
53        '-std=c11',
54        '-Wno-strict-prototypes',
55        '-D_BSD_SOURCE',
56        '-D_DEFAULT_SOURCE',
57        '-D_XOPEN_SOURCE=600',
58]
59foreach option:cflags_options
60    if cc.has_argument(option)
61        cflags += option
62    endif
63endforeach
64if get_option('buildtype').contains('debug')
65    cflags += [ '-pedantic', '-DPEDANTIC' ]
66else
67    cflags += [ '-UPEDANTIC' ]
68endif
69subdir(exec_env)
70