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 += -I$(RTE_SDK)/drivers/common/iavf
15 LDLIBS += -lrte_eal -lrte_mbuf -lrte_ethdev -lrte_kvargs
16 LDLIBS += -lrte_bus_pci -lrte_mempool -lrte_hash
17 LDLIBS += -lrte_net -lrte_common_iavf
20 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
57 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_acl.c
58 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_acl_ctrl.c
60 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_ethdev.c
61 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_rxtx.c
62 ifeq ($(CONFIG_RTE_ARCH_X86), y)
63 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_rxtx_vec_sse.c
66 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_switch_filter.c
67 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_fdir_filter.c
68 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_hash.c
69 ifeq ($(findstring RTE_MACHINE_CPUFLAG_AVX2,$(CFLAGS)),RTE_MACHINE_CPUFLAG_AVX2)
73 $(shell $(CC) -march=core-avx2 -dM -E - </dev/null 2>&1 | \
74 grep -q AVX2 && echo 1)
75 ifeq ($(CC_AVX2_SUPPORT), 1)
76 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
77 CFLAGS_ice_rxtx_vec_avx2.o += -march=core-avx2
79 CFLAGS_ice_rxtx_vec_avx2.o += -mavx2
84 ifeq ($(CC_AVX2_SUPPORT), 1)
85 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_rxtx_vec_avx2.c
87 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_generic_flow.c
89 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_dcf.c
90 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_dcf_ethdev.c
91 SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_dcf_parent.c
93 # install this header file
94 SYMLINK-$(CONFIG_RTE_LIBRTE_ICE_PMD)-include := rte_pmd_ice.h
96 include $(RTE_SDK)/mk/rte.lib.mk