f9e897bbc236ce82ee6c490a15c837bc45b720d1
[dpdk.git] / drivers / net / ice / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2018 Intel Corporation
3
4 allow_experimental_apis = true
5
6 subdir('base')
7 objs = [base_objs]
8
9 sources = files(
10         'ice_ethdev.c',
11         'ice_rxtx.c',
12         'ice_switch_filter.c',
13         'ice_generic_flow.c',
14         'ice_fdir_filter.c',
15         'ice_hash.c'
16         )
17
18 deps += ['hash']
19 includes += include_directories('base')
20
21 if arch_subdir == 'x86'
22         sources += files('ice_rxtx_vec_sse.c')
23
24         # compile AVX2 version if either:
25         # a. we have AVX supported in minimum instruction set baseline
26         # b. it's not minimum instruction set, but supported by compiler
27         if dpdk_conf.has('RTE_MACHINE_CPUFLAG_AVX2')
28                 sources += files('ice_rxtx_vec_avx2.c')
29         elif cc.has_argument('-mavx2')
30                 ice_avx2_lib = static_library('ice_avx2_lib',
31                                 'ice_rxtx_vec_avx2.c',
32                                 dependencies: [static_rte_ethdev,
33                                         static_rte_kvargs, static_rte_hash],
34                                 include_directories: includes,
35                                 c_args: [cflags, '-mavx2'])
36                 objs += ice_avx2_lib.extract_objects('ice_rxtx_vec_avx2.c')
37         endif
38 endif
39
40 install_headers('rte_pmd_ice.h')