1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2018 Intel Corporation
4 include $(RTE_SDK)/mk/rte.vars.mk
12 CFLAGS += $(WERROR_FLAGS)
14 LDLIBS += -lrte_eal -lrte_mbuf -lrte_ethdev -lrte_kvargs
15 LDLIBS += -lrte_bus_pci -lrte_mempool
17 EXPORT_MAP := rte_pmd_ice_version.map
22 # Add extra flags for base driver files (also known as shared code)
25 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
27 else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
28 CFLAGS_BASE_DRIVER += -Wno-unused-parameter
29 CFLAGS_BASE_DRIVER += -Wno-unused-variable
31 CFLAGS_BASE_DRIVER += -Wno-unused-parameter
32 CFLAGS_BASE_DRIVER += -Wno-unused-variable
34 ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1)
35 CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
39 OBJS_BASE_DRIVER=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
40 $(foreach obj, $(OBJS_BASE_DRIVER), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
42 VPATH += $(SRCDIR)/base
45 # all source are stored in SRCS-y
47 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_controlq.c
48 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_common.c
49 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_sched.c
50 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_switch.c
51 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_nvm.c
52 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_flex_pipe.c
53 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_flow.c
55 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_ethdev.c
56 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_rxtx.c
57 ifeq ($(CONFIG_RTE_ARCH_X86), y)
58 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_rxtx_vec_sse.c
61 ifeq ($(findstring RTE_MACHINE_CPUFLAG_AVX2,$(CFLAGS)),RTE_MACHINE_CPUFLAG_AVX2)
65 $(shell $(CC) -march=core-avx2 -dM -E - </dev/null 2>&1 | \
66 grep -q AVX2 && echo 1)
67 ifeq ($(CC_AVX2_SUPPORT), 1)
68 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
69 CFLAGS_ice_rxtx_vec_avx2.o += -march=core-avx2
71 CFLAGS_ice_rxtx_vec_avx2.o += -mavx2
76 ifeq ($(CC_AVX2_SUPPORT), 1)
77 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_rxtx_vec_avx2.c
80 include $(RTE_SDK)/mk/rte.lib.mk