1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2017 Intel Corporation
5 sources = files('acl_bld.c', 'acl_gen.c', 'acl_run_scalar.c',
6 'rte_acl.c', 'tb_mem.c')
7 headers = files('rte_acl.h', 'rte_acl_osdep.h')
9 if dpdk_conf.has('RTE_ARCH_X86')
10 sources += files('acl_run_sse.c')
12 # compile AVX2 version if either:
13 # a. we have AVX supported in minimum instruction set baseline
14 # b. it's not minimum instruction set, but supported by compiler
16 # in former case, just add avx2 C file to files list
17 # in latter case, compile c file to static lib, using correct compiler
18 # flags, and then have the .o file from static lib linked into main lib.
19 if dpdk_conf.has('RTE_MACHINE_CPUFLAG_AVX2')
20 sources += files('acl_run_avx2.c')
21 cflags += '-DCC_AVX2_SUPPORT'
22 elif cc.has_argument('-mavx2')
23 avx2_tmplib = static_library('avx2_tmp',
25 dependencies: static_rte_eal,
26 c_args: cflags + ['-mavx2'])
27 objs += avx2_tmplib.extract_objects('acl_run_avx2.c')
28 cflags += '-DCC_AVX2_SUPPORT'
31 elif dpdk_conf.has('RTE_ARCH_ARM') or dpdk_conf.has('RTE_ARCH_ARM64')
32 cflags += '-flax-vector-conversions'
33 sources += files('acl_run_neon.c')
34 elif dpdk_conf.has('RTE_ARCH_PPC_64')
35 sources += files('acl_run_altivec.c')