net/bnxt: add 64B SRAM record management with RM
[dpdk.git] / drivers / net / bnxt / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2018 Intel Corporation
3 # Copyright(c) 2020 Broadcom
4
5 if is_windows
6     build = false
7     reason = 'not supported on Windows'
8     subdir_done()
9 endif
10
11 cflags_options = [
12         '-DSUPPORT_CFA_HW_ALL=1',
13 ]
14
15 foreach option:cflags_options
16         if cc.has_argument(option)
17                 cflags += option
18         endif
19 endforeach
20
21 headers = files('rte_pmd_bnxt.h')
22
23 sources = files(
24         'bnxt_cpr.c',
25         'bnxt_ethdev.c',
26         'bnxt_filter.c',
27         'bnxt_flow.c',
28         'bnxt_hwrm.c',
29         'bnxt_irq.c',
30         'bnxt_ring.c',
31         'bnxt_rxq.c',
32         'bnxt_rxr.c',
33         'bnxt_stats.c',
34         'bnxt_txq.c',
35         'bnxt_txr.c',
36         'bnxt_util.c',
37         'bnxt_vnic.c',
38         'bnxt_reps.c',
39
40         'rte_pmd_bnxt.c',
41 )
42
43 #Add the subdirectories that need to be compiled
44 subdir('tf_ulp')
45 subdir('tf_core')
46 subdir('hcapi/cfa')
47
48 if arch_subdir == 'x86'
49     sources += files('bnxt_rxtx_vec_sse.c')
50     # compile AVX2 version if either:
51     # a. we have AVX supported in minimum instruction set baseline
52     # b. it's not minimum instruction set, but supported by compiler
53     if cc.get_define('__AVX2__', args: machine_args) != ''
54             cflags += ['-DCC_AVX2_SUPPORT']
55             sources += files('bnxt_rxtx_vec_avx2.c')
56     elif cc.has_argument('-mavx2')
57             cflags += ['-DCC_AVX2_SUPPORT']
58             bnxt_avx2_lib = static_library('bnxt_avx2_lib',
59                             'bnxt_rxtx_vec_avx2.c',
60                             dependencies: [static_rte_ethdev,
61                                     static_rte_bus_pci,
62                                     static_rte_kvargs, static_rte_hash],
63                             include_directories: includes,
64                             c_args: [cflags, '-mavx2'])
65             objs += bnxt_avx2_lib.extract_objects('bnxt_rxtx_vec_avx2.c')
66      endif
67 elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
68     sources += files('bnxt_rxtx_vec_neon.c')
69 endif