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
15 # all source are stored in SRCS-y
16 SRCS-$(CONFIG_RTE_LIBRTE_ACL) += tb_mem.c
18 SRCS-$(CONFIG_RTE_LIBRTE_ACL) += rte_acl.c
19 SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_bld.c
20 SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_gen.c
21 SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_scalar.c
23 ifneq ($(filter y,$(CONFIG_RTE_ARCH_ARM) $(CONFIG_RTE_ARCH_ARM64)),)
24 SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_neon.c
25 CFLAGS_acl_run_neon.o += -flax-vector-conversions
26 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
27 CFLAGS_acl_run_neon.o += -Wno-maybe-uninitialized
29 else ifeq ($(CONFIG_RTE_ARCH_PPC_64),y)
30 SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_altivec.c
32 SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_sse.c
36 # If the compiler supports AVX2 instructions,
37 # then add support for AVX2 classify method.
40 #check if flag for AVX2 is already on, if not set it up manually
41 ifeq ($(findstring RTE_MACHINE_CPUFLAG_AVX2,$(CFLAGS)),RTE_MACHINE_CPUFLAG_AVX2)
45 $(shell $(CC) -march=core-avx2 -dM -E - </dev/null 2>&1 | \
46 grep -q AVX2 && echo 1)
47 ifeq ($(CC_AVX2_SUPPORT), 1)
48 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
49 CFLAGS_acl_run_avx2.o += -march=core-avx2
51 CFLAGS_acl_run_avx2.o += -mavx2
56 ifeq ($(CC_AVX2_SUPPORT), 1)
57 SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_avx2.c
58 CFLAGS_rte_acl.o += -DCC_AVX2_SUPPORT
61 # install this header file
62 SYMLINK-$(CONFIG_RTE_LIBRTE_ACL)-include := rte_acl_osdep.h
63 SYMLINK-$(CONFIG_RTE_LIBRTE_ACL)-include += rte_acl.h
65 include $(RTE_SDK)/mk/rte.lib.mk