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
59 ifeq ($(shell test $(GCC_VERSION) -ge 70 && echo 1), 1)
60 CFLAGS_BASE_DRIVER += -Wno-implicit-fallthrough
63 else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
64 CFLAGS_BASE_DRIVER += -Wno-format-extra-args
65 CFLAGS_BASE_DRIVER += -Wno-visibility
66 CFLAGS_BASE_DRIVER += -Wno-empty-body
67 CFLAGS_BASE_DRIVER += -Wno-invalid-source-encoding
68 CFLAGS_BASE_DRIVER += -Wno-sometimes-uninitialized
69 ifeq ($(shell clang -Wno-pointer-bool-conversion -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0)
70 CFLAGS_BASE_DRIVER += -Wno-pointer-bool-conversion
73 CFLAGS_BASE_DRIVER += -wd188 #188: enumerated type mixed with another type
77 # Add extra flags for base ecore driver files
78 # to disable warnings in them
81 BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
82 $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
84 VPATH += $(SRCDIR)/base
87 # all source are stored in SRCS-y
89 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_dev.c
90 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_hw.c
91 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_cxt.c
92 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_l2.c
93 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_sp_commands.c
94 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_init_fw_funcs.c
95 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_spq.c
96 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_init_ops.c
97 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_mcp.c
98 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_int.c
99 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_dcbx.c
100 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += bcm_osal.c
101 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_sriov.c
102 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_vf.c
103 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_ethdev.c
104 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_main.c
105 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_rxtx.c
106 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_fdir.c
108 include $(RTE_SDK)/mk/rte.lib.mk