New upstream version 18.11-rc1
[deb_dpdk.git] / drivers / net / enic / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2018 Cisco Systems, Inc.
3
4 sources = files(
5         'base/vnic_cq.c',
6         'base/vnic_dev.c',
7         'base/vnic_intr.c',
8         'base/vnic_rq.c',
9         'base/vnic_rss.c',
10         'base/vnic_wq.c',
11         'enic_clsf.c',
12         'enic_ethdev.c',
13         'enic_flow.c',
14         'enic_main.c',
15         'enic_res.c',
16         'enic_rxtx.c',
17         )
18 deps += ['hash']
19 includes += include_directories('base')
20
21 # The current implementation assumes 64-bit pointers
22 if dpdk_conf.has('RTE_MACHINE_CPUFLAG_AVX2') and cc.sizeof('void *') == 8
23         sources += files('enic_rxtx_vec_avx2.c')
24 # Build the avx2 handler if the compiler supports it, even though 'machine'
25 # does not. This is to support users who build for the min supported machine
26 # and need to run the binary on newer CPUs too.
27 # This part is from i40e meson.build
28 elif cc.has_argument('-mavx2') and cc.sizeof('void *') == 8
29         enic_avx2_lib = static_library('enic_avx2_lib',
30                         'enic_rxtx_vec_avx2.c',
31                         dependencies: [static_rte_ethdev, static_rte_bus_pci],
32                         include_directories: includes,
33                         c_args: [cflags, '-mavx2'])
34         objs += enic_avx2_lib.extract_objects('enic_rxtx_vec_avx2.c')
35 endif