197e611d8d26e7b7751b713e9580ca440c4f2034
[dpdk.git] / drivers / net / i40e / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2017 Intel Corporation
3
4 version = 2
5
6 cflags += ['-DPF_DRIVER',
7         '-DVF_DRIVER',
8         '-DINTEGRATED_VF',
9         '-DX722_A0_SUPPORT']
10
11 subdir('base')
12 objs = [base_objs]
13
14 sources = files(
15         'i40e_ethdev.c',
16         'i40e_rxtx.c',
17         'i40e_ethdev_vf.c',
18         'i40e_pf.c',
19         'i40e_fdir.c',
20         'i40e_flow.c',
21         'i40e_tm.c',
22         'rte_pmd_i40e.c'
23         )
24
25 deps += ['hash']
26
27 if arch_subdir == 'x86'
28         dpdk_conf.set('RTE_LIBRTE_I40E_INC_VECTOR', 1)
29         sources += files('i40e_rxtx_vec_sse.c')
30
31         # compile AVX2 version if either:
32         # a. we have AVX supported in minimum instruction set baseline
33         # b. it's not minimum instruction set, but supported by compiler
34         if dpdk_conf.has('RTE_MACHINE_CPUFLAG_AVX2')
35                 sources += files('i40e_rxtx_vec_avx2.c')
36         elif cc.has_argument('-mavx2')
37                 i40e_avx2_lib = static_library('i40e_avx2_lib',
38                                 'i40e_rxtx_vec_avx2.c',
39                                 dependencies: [static_rte_ethdev,
40                                         static_rte_kvargs, static_rte_hash],
41                                 c_args: '-mavx2')
42                 objs += i40e_avx2_lib.extract_objects('i40e_rxtx_vec_avx2.c')
43         endif
44 endif
45
46 includes += include_directories('base')
47
48 install_headers('rte_pmd_i40e.h')