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)
13 CFLAGS += -DALLOW_EXPERIMENTAL_API
15 LDLIBS += -lrte_eal -lrte_mbuf -lrte_ethdev -lrte_kvargs
16 LDLIBS += -lrte_bus_pci -lrte_mempool
18 EXPORT_MAP := rte_pmd_ice_version.map
23 # Add extra flags for base driver files (also known as shared code)
26 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
28 else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
29 CFLAGS_BASE_DRIVER += -Wno-unused-parameter
30 CFLAGS_BASE_DRIVER += -Wno-unused-variable
32 CFLAGS_BASE_DRIVER += -Wno-unused-parameter
33 CFLAGS_BASE_DRIVER += -Wno-unused-variable
35 ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1)
36 CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
40 OBJS_BASE_DRIVER=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
41 $(foreach obj, $(OBJS_BASE_DRIVER), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
43 VPATH += $(SRCDIR)/base
46 # all source are stored in SRCS-y
48 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_controlq.c
49 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_common.c
50 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_sched.c
51 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_switch.c
52 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_nvm.c
53 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_flex_pipe.c
54 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_flow.c
55 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_dcb.c
56 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_fdir.c
58 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_ethdev.c
59 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_rxtx.c
60 ifeq ($(CONFIG_RTE_ARCH_X86), y)
61 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_rxtx_vec_sse.c
64 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_switch_filter.c
65 ifeq ($(findstring RTE_MACHINE_CPUFLAG_AVX2,$(CFLAGS)),RTE_MACHINE_CPUFLAG_AVX2)
69 $(shell $(CC) -march=core-avx2 -dM -E - </dev/null 2>&1 | \
70 grep -q AVX2 && echo 1)
71 ifeq ($(CC_AVX2_SUPPORT), 1)
72 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
73 CFLAGS_ice_rxtx_vec_avx2.o += -march=core-avx2
75 CFLAGS_ice_rxtx_vec_avx2.o += -mavx2
80 ifeq ($(CC_AVX2_SUPPORT), 1)
81 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_rxtx_vec_avx2.c
83 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_generic_flow.c
85 include $(RTE_SDK)/mk/rte.lib.mk