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
19 # Add extra flags for base driver files (also known as shared code)
22 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
24 else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
25 CFLAGS_BASE_DRIVER = -Wno-pointer-to-int-cast
27 CFLAGS_BASE_DRIVER = -Wno-pointer-to-int-cast
30 OBJS_BASE_DRIVER=$(sort $(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c))))
31 $(foreach obj, $(OBJS_BASE_DRIVER), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
34 VPATH += $(SRCDIR)/base
37 # all source are stored in SRCS-y
39 SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_adminq.c
40 SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_common.c
42 SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_ethdev.c
43 SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_vchnl.c
44 SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx.c
45 ifeq ($(CONFIG_RTE_ARCH_X86), y)
46 SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx_vec_sse.c
49 ifeq ($(CONFIG_RTE_LIBRTE_IAVF_PMD), y)
50 ifeq ($(findstring RTE_MACHINE_CPUFLAG_AVX2,$(CFLAGS)),RTE_MACHINE_CPUFLAG_AVX2)
54 $(shell $(CC) -march=core-avx2 -dM -E - </dev/null 2>&1 | \
55 grep -q AVX2 && echo 1)
56 ifeq ($(CC_AVX2_SUPPORT), 1)
57 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
58 CFLAGS_iavf_rxtx_vec_avx2.o += -march=core-avx2
60 CFLAGS_iavf_rxtx_vec_avx2.o += -mavx2
66 ifeq ($(CC_AVX2_SUPPORT), 1)
67 SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx_vec_avx2.c
70 include $(RTE_SDK)/mk/rte.lib.mk