1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2010-2014 Intel Corporation
4 include $(RTE_SDK)/mk/rte.vars.mk
10 CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
13 EXPORT_MAP := rte_acl_version.map
17 # all source are stored in SRCS-y
18 SRCS-$(CONFIG_RTE_LIBRTE_ACL) += tb_mem.c
20 SRCS-$(CONFIG_RTE_LIBRTE_ACL) += rte_acl.c
21 SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_bld.c
22 SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_gen.c
23 SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_scalar.c
25 ifneq ($(filter y,$(CONFIG_RTE_ARCH_ARM) $(CONFIG_RTE_ARCH_ARM64)),)
26 SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_neon.c
27 CFLAGS_acl_run_neon.o += -flax-vector-conversions
28 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
29 CFLAGS_acl_run_neon.o += -Wno-maybe-uninitialized
31 else ifeq ($(CONFIG_RTE_ARCH_PPC_64),y)
32 SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_altivec.c
34 SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_sse.c
38 # If the compiler supports AVX2 instructions,
39 # then add support for AVX2 classify method.
42 #check if flag for AVX2 is already on, if not set it up manually
43 ifeq ($(findstring RTE_MACHINE_CPUFLAG_AVX2,$(CFLAGS)),RTE_MACHINE_CPUFLAG_AVX2)
47 $(shell $(CC) -march=core-avx2 -dM -E - </dev/null 2>&1 | \
48 grep -q AVX2 && echo 1)
49 ifeq ($(CC_AVX2_SUPPORT), 1)
50 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
51 CFLAGS_acl_run_avx2.o += -march=core-avx2
53 CFLAGS_acl_run_avx2.o += -mavx2
58 ifeq ($(CC_AVX2_SUPPORT), 1)
59 SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_avx2.c
60 CFLAGS_rte_acl.o += -DCC_AVX2_SUPPORT
63 # install this header file
64 SYMLINK-$(CONFIG_RTE_LIBRTE_ACL)-include := rte_acl_osdep.h
65 SYMLINK-$(CONFIG_RTE_LIBRTE_ACL)-include += rte_acl.h
67 include $(RTE_SDK)/mk/rte.lib.mk