1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2017 Intel Corporation
4 include $(RTE_SDK)/mk/rte.vars.mk
9 LIB = librte_pmd_iavf.a
11 CFLAGS += -O3 $(WERROR_FLAGS) -Wno-strict-aliasing -DALLOW_EXPERIMENTAL_API
12 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
13 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash
14 LDLIBS += -lrte_bus_pci
16 EXPORT_MAP := rte_pmd_iavf_version.map
21 # Add extra flags for base driver files (also known as shared code)
24 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
26 else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
27 CFLAGS_BASE_DRIVER = -Wno-pointer-to-int-cast
29 CFLAGS_BASE_DRIVER = -Wno-pointer-to-int-cast
32 OBJS_BASE_DRIVER=$(sort $(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c))))
33 $(foreach obj, $(OBJS_BASE_DRIVER), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
36 VPATH += $(SRCDIR)/base
39 # all source are stored in SRCS-y
41 SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_adminq.c
42 SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_common.c
44 SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_ethdev.c
45 SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_vchnl.c
46 SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx.c
47 ifeq ($(CONFIG_RTE_ARCH_X86), y)
48 SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx_vec_sse.c
51 ifeq ($(CONFIG_RTE_LIBRTE_IAVF_PMD), y)
52 ifeq ($(findstring RTE_MACHINE_CPUFLAG_AVX2,$(CFLAGS)),RTE_MACHINE_CPUFLAG_AVX2)
56 $(shell $(CC) -march=core-avx2 -dM -E - </dev/null 2>&1 | \
57 grep -q AVX2 && echo 1)
58 ifeq ($(CC_AVX2_SUPPORT), 1)
59 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
60 CFLAGS_iavf_rxtx_vec_avx2.o += -march=core-avx2
62 CFLAGS_iavf_rxtx_vec_avx2.o += -mavx2
68 ifeq ($(CC_AVX2_SUPPORT), 1)
69 SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx_vec_avx2.c
72 include $(RTE_SDK)/mk/rte.lib.mk