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 ifeq ($(shell gcc -Wno-unused-but-set-variable -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0)
52 CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
54 CFLAGS_BASE_DRIVER += -Wno-missing-declarations
55 ifeq ($(shell gcc -Wno-maybe-uninitialized -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0)
56 CFLAGS_BASE_DRIVER += -Wno-maybe-uninitialized
58 CFLAGS_BASE_DRIVER += -Wno-strict-prototypes
59 ifeq ($(shell test $(GCC_VERSION) -ge 60 && echo 1), 1)
60 CFLAGS_BASE_DRIVER += -Wno-shift-negative-value
62 else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
63 CFLAGS_BASE_DRIVER += -Wno-format-extra-args
64 CFLAGS_BASE_DRIVER += -Wno-visibility
65 CFLAGS_BASE_DRIVER += -Wno-empty-body
66 CFLAGS_BASE_DRIVER += -Wno-invalid-source-encoding
67 CFLAGS_BASE_DRIVER += -Wno-sometimes-uninitialized
68 ifeq ($(shell clang -Wno-pointer-bool-conversion -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0)
69 CFLAGS_BASE_DRIVER += -Wno-pointer-bool-conversion
72 CFLAGS_BASE_DRIVER += -wd188 #188: enumerated type mixed with another type
76 # Add extra flags for base ecore driver files
77 # to disable warnings in them
80 BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
81 $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS+=$(CFLAGS_BASE_DRIVER)))
84 # all source are stored in SRCS-y
86 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_dev.c
87 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_hw.c
88 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_cxt.c
89 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_l2.c
90 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_sp_commands.c
91 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_init_fw_funcs.c
92 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_spq.c
93 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_init_ops.c
94 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_mcp.c
95 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_int.c
96 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_dcbx.c
97 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/bcm_osal.c
98 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_sriov.c
99 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_vf.c
100 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_ethdev.c
101 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_eth_if.c
102 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_main.c
103 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_rxtx.c
106 DEPDIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += lib/librte_eal lib/librte_ether
107 DEPDIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += lib/librte_mempool lib/librte_mbuf
108 DEPDIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += lib/librte_net
110 include $(RTE_SDK)/mk/rte.lib.mk