1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright (c) 2016 - 2018 Cavium Inc.
6 include $(RTE_SDK)/mk/rte.vars.mk
11 LIB = librte_pmd_qede.a
14 CFLAGS += $(WERROR_FLAGS)
15 CFLAGS += -DALLOW_EXPERIMENTAL_API
16 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
17 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
18 LDLIBS += -lrte_bus_pci
20 EXPORT_MAP := rte_pmd_qede_version.map
27 OS_TYPE := $(shell uname -s)
32 CFLAGS_BASE_DRIVER = -Wno-unused-parameter
33 CFLAGS_BASE_DRIVER += -Wno-sign-compare
34 CFLAGS_BASE_DRIVER += -Wno-missing-prototypes
35 CFLAGS_BASE_DRIVER += -Wno-cast-qual
36 CFLAGS_BASE_DRIVER += -Wno-unused-function
37 CFLAGS_BASE_DRIVER += -Wno-unused-variable
38 CFLAGS_BASE_DRIVER += -Wno-strict-aliasing
39 CFLAGS_BASE_DRIVER += -Wno-missing-prototypes
41 ifneq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
42 CFLAGS_BASE_DRIVER += -Wno-unused-value
43 CFLAGS_BASE_DRIVER += -Wno-format-nonliteral
44 ifeq ($(OS_TYPE),Linux)
45 ifeq ($(shell clang -Wno-shift-negative-value -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0)
46 CFLAGS_BASE_DRIVER += -Wno-shift-negative-value
51 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
52 ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1)
53 CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
55 CFLAGS_BASE_DRIVER += -Wno-missing-declarations
56 ifeq ($(shell test $(GCC_VERSION) -ge 46 && echo 1), 1)
57 CFLAGS_BASE_DRIVER += -Wno-maybe-uninitialized
59 CFLAGS_BASE_DRIVER += -Wno-strict-prototypes
60 ifeq ($(shell test $(GCC_VERSION) -ge 60 && echo 1), 1)
61 CFLAGS_BASE_DRIVER += -Wno-shift-negative-value
62 ifeq ($(shell test $(GCC_VERSION) -ge 70 && echo 1), 1)
63 CFLAGS_BASE_DRIVER += -Wno-implicit-fallthrough
66 else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
67 CFLAGS_BASE_DRIVER += -Wno-format-extra-args
68 CFLAGS_BASE_DRIVER += -Wno-visibility
69 CFLAGS_BASE_DRIVER += -Wno-empty-body
70 CFLAGS_BASE_DRIVER += -Wno-invalid-source-encoding
71 CFLAGS_BASE_DRIVER += -Wno-sometimes-uninitialized
72 ifeq ($(shell clang -Wno-pointer-bool-conversion -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0)
73 CFLAGS_BASE_DRIVER += -Wno-pointer-bool-conversion
76 CFLAGS_qede_ethdev.o += -diag-disable 279 #279: controlling expression is constant
80 # Add extra flags for base ecore driver files
81 # to disable warnings in them
84 BASE_DRIVER_OBJS=$(sort $(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c))))
85 $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
87 VPATH += $(SRCDIR)/base
90 # all source are stored in SRCS-y
92 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_dev.c
93 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_hw.c
94 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_cxt.c
95 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_l2.c
96 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_sp_commands.c
97 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_init_fw_funcs.c
98 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_spq.c
99 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_init_ops.c
100 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_mcp.c
101 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_int.c
102 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_dcbx.c
103 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += bcm_osal.c
104 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_sriov.c
105 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_vf.c
106 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_ethdev.c
107 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_main.c
108 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_rxtx.c
109 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_filter.c
111 include $(RTE_SDK)/mk/rte.lib.mk