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)
17 EXPORT_MAP := rte_pmd_qede_version.map
24 OS_TYPE := $(shell uname -s)
29 CFLAGS_BASE_DRIVER = -Wno-unused-parameter
30 CFLAGS_BASE_DRIVER += -Wno-sign-compare
31 CFLAGS_BASE_DRIVER += -Wno-missing-prototypes
32 CFLAGS_BASE_DRIVER += -Wno-cast-qual
33 CFLAGS_BASE_DRIVER += -Wno-unused-function
34 CFLAGS_BASE_DRIVER += -Wno-unused-variable
35 CFLAGS_BASE_DRIVER += -Wno-strict-aliasing
36 CFLAGS_BASE_DRIVER += -Wno-missing-prototypes
38 ifneq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
39 CFLAGS_BASE_DRIVER += -Wno-unused-value
40 CFLAGS_BASE_DRIVER += -Wno-format-nonliteral
41 ifeq ($(OS_TYPE),Linux)
42 ifeq ($(shell clang -Wno-shift-negative-value -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0)
43 CFLAGS_BASE_DRIVER += -Wno-shift-negative-value
48 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
49 ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1)
50 CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
52 CFLAGS_BASE_DRIVER += -Wno-missing-declarations
53 ifeq ($(shell test $(GCC_VERSION) -ge 46 && echo 1), 1)
54 CFLAGS_BASE_DRIVER += -Wno-maybe-uninitialized
56 CFLAGS_BASE_DRIVER += -Wno-strict-prototypes
57 ifeq ($(shell test $(GCC_VERSION) -ge 60 && echo 1), 1)
58 CFLAGS_BASE_DRIVER += -Wno-shift-negative-value
60 else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
61 CFLAGS_BASE_DRIVER += -Wno-format-extra-args
62 CFLAGS_BASE_DRIVER += -Wno-visibility
63 CFLAGS_BASE_DRIVER += -Wno-empty-body
64 CFLAGS_BASE_DRIVER += -Wno-invalid-source-encoding
65 CFLAGS_BASE_DRIVER += -Wno-sometimes-uninitialized
66 ifeq ($(shell clang -Wno-pointer-bool-conversion -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0)
67 CFLAGS_BASE_DRIVER += -Wno-pointer-bool-conversion
70 CFLAGS_BASE_DRIVER += -wd188 #188: enumerated type mixed with another type
74 # Add extra flags for base ecore driver files
75 # to disable warnings in them
78 BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
79 $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS+=$(CFLAGS_BASE_DRIVER)))
82 # all source are stored in SRCS-y
84 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_dev.c
85 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_hw.c
86 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_cxt.c
87 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_l2.c
88 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_sp_commands.c
89 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_init_fw_funcs.c
90 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_spq.c
91 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_init_ops.c
92 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_mcp.c
93 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_int.c
94 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_dcbx.c
95 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/bcm_osal.c
96 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_sriov.c
97 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_vf.c
98 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_ethdev.c
99 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_eth_if.c
100 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_main.c
101 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_rxtx.c
103 include $(RTE_SDK)/mk/rte.lib.mk