1# SPDX-License-Identifier: BSD-3-Clause 2# Copyright(C) 2021 Marvell. 3# 4 5sources = files( 6 'otx_ep_ethdev.c', 7 'otx_ep_rxtx.c', 8 'otx_ep_vf.c', 9 'otx2_ep_vf.c', 10 'cnxk_ep_vf.c', 11 'otx_ep_mbox.c', 12 'cnxk_ep_rx.c', 13 'cnxk_ep_tx.c', 14) 15 16if arch_subdir == 'x86' 17 sources += files('cnxk_ep_rx_sse.c') 18 if cc.get_define('__AVX2__', args: machine_args) != '' 19 cflags += ['-DCC_AVX2_SUPPORT'] 20 sources += files('cnxk_ep_rx_avx.c') 21 elif cc.has_argument('-mavx2') 22 cflags += ['-DCC_AVX2_SUPPORT'] 23 otx_ep_avx2_lib = static_library('otx_ep_avx2_lib', 24 'cnxk_ep_rx_avx.c', 25 dependencies: [static_rte_ethdev, static_rte_pci, static_rte_bus_pci], 26 include_directories: includes, 27 c_args: [cflags, '-mavx2']) 28 objs += otx_ep_avx2_lib.extract_objects('cnxk_ep_rx_avx.c') 29 endif 30endif 31 32if arch_subdir == 'arm' 33 sources += files('cnxk_ep_rx_neon.c') 34endif 35 36extra_flags = ['-Wno-strict-aliasing', '-flax-vector-conversions'] 37foreach flag: extra_flags 38 if cc.has_argument(flag) 39 cflags += flag 40 endif 41endforeach 42