]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | # SPDX-License-Identifier: BSD-3-Clause |
2 | # Copyright(c) 2010-2014 Intel Corporation | |
3 | ||
4 | include $(RTE_SDK)/mk/rte.vars.mk | |
5 | ||
6 | # library name | |
7 | LIB = librte_acl.a | |
8 | ||
9 | CFLAGS += -O3 | |
10 | CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) | |
11 | LDLIBS += -lrte_eal | |
12 | ||
13 | EXPORT_MAP := rte_acl_version.map | |
14 | ||
11fdf7f2 TL |
15 | # all source are stored in SRCS-y |
16 | SRCS-$(CONFIG_RTE_LIBRTE_ACL) += tb_mem.c | |
17 | ||
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 | |
22 | ||
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 | |
28 | endif | |
29 | else ifeq ($(CONFIG_RTE_ARCH_PPC_64),y) | |
30 | SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_altivec.c | |
31 | else | |
32 | SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_sse.c | |
33 | endif | |
34 | ||
35 | # | |
36 | # If the compiler supports AVX2 instructions, | |
37 | # then add support for AVX2 classify method. | |
38 | # | |
39 | ||
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) | |
42 | CC_AVX2_SUPPORT=1 | |
43 | else | |
44 | CC_AVX2_SUPPORT=\ | |
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 | |
50 | else | |
51 | CFLAGS_acl_run_avx2.o += -mavx2 | |
52 | endif | |
53 | endif | |
54 | endif | |
55 | ||
56 | ifeq ($(CC_AVX2_SUPPORT), 1) | |
57 | SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_avx2.c | |
58 | CFLAGS_rte_acl.o += -DCC_AVX2_SUPPORT | |
59 | endif | |
60 | ||
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 | |
64 | ||
65 | include $(RTE_SDK)/mk/rte.lib.mk |