1 # Copyright (c) 2016 QLogic Corporation.
5 # See LICENSE.qede_pmd for copyright and licensing details.
7 include $(RTE_SDK)/mk/rte.vars.mk
12 LIB = librte_pmd_qede.a
15 CFLAGS += $(WERROR_FLAGS)
19 EXPORT_MAP := rte_pmd_qede_version.map
26 OS_TYPE := $(shell uname -s)
31 CFLAGS_BASE_DRIVER = -Wno-unused-parameter
32 CFLAGS_BASE_DRIVER += -Wno-sign-compare
33 CFLAGS_BASE_DRIVER += -Wno-missing-prototypes
34 CFLAGS_BASE_DRIVER += -Wno-cast-qual
35 CFLAGS_BASE_DRIVER += -Wno-unused-function
36 CFLAGS_BASE_DRIVER += -Wno-unused-variable
37 CFLAGS_BASE_DRIVER += -Wno-strict-aliasing
38 CFLAGS_BASE_DRIVER += -Wno-missing-prototypes
40 ifneq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
41 CFLAGS_BASE_DRIVER += -Wno-unused-value
42 CFLAGS_BASE_DRIVER += -Wno-format-nonliteral
43 ifeq ($(OS_TYPE),Linux)
44 ifeq ($(shell clang -Wno-shift-negative-value -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0)
45 CFLAGS_BASE_DRIVER += -Wno-shift-negative-value
50 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
51 CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
52 CFLAGS_BASE_DRIVER += -Wno-missing-declarations
53 CFLAGS_BASE_DRIVER += -Wno-maybe-uninitialized
54 CFLAGS_BASE_DRIVER += -Wno-strict-prototypes
55 ifeq ($(shell test $(GCC_VERSION) -ge 60 && echo 1), 1)
56 CFLAGS_BASE_DRIVER += -Wno-shift-negative-value
58 else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
59 CFLAGS_BASE_DRIVER += -Wno-format-extra-args
60 CFLAGS_BASE_DRIVER += -Wno-visibility
61 CFLAGS_BASE_DRIVER += -Wno-empty-body
62 CFLAGS_BASE_DRIVER += -Wno-invalid-source-encoding
63 CFLAGS_BASE_DRIVER += -Wno-sometimes-uninitialized
64 ifeq ($(shell clang -Wno-pointer-bool-conversion -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0)
65 CFLAGS_BASE_DRIVER += -Wno-pointer-bool-conversion
68 CFLAGS_BASE_DRIVER += -wd188 #188: enumerated type mixed with another type
72 # Add extra flags for base ecore driver files
73 # to disable warnings in them
76 BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
77 $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS+=$(CFLAGS_BASE_DRIVER)))
80 # all source are stored in SRCS-y
82 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_dev.c
83 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_hw.c
84 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_cxt.c
85 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_l2.c
86 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_sp_commands.c
87 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_init_fw_funcs.c
88 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_spq.c
89 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_init_ops.c
90 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_mcp.c
91 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_int.c
92 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_dcbx.c
93 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/bcm_osal.c
94 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_sriov.c
95 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_vf.c
96 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_ethdev.c
97 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_eth_if.c
98 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_main.c
99 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_rxtx.c
102 DEPDIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += lib/librte_eal lib/librte_ether
103 DEPDIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += lib/librte_mempool lib/librte_mbuf
104 DEPDIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += lib/librte_net
106 include $(RTE_SDK)/mk/rte.lib.mk