1 # Copyright (c) 2016 QLogic Corporation.
5 # See LICENSE.qede_pmd for copyright and licensing details.
7 include $(RTE_SDK)/mk/rte.vars.mk
10 CFLAGS += $(WERROR_FLAGS)
15 OS_TYPE := $(shell uname -s)
20 CFLAGS_BASE_DRIVER = -Wno-unused-parameter
21 CFLAGS_BASE_DRIVER += -Wno-unused-value
22 CFLAGS_BASE_DRIVER += -Wno-sign-compare
23 CFLAGS_BASE_DRIVER += -Wno-missing-prototypes
24 CFLAGS_BASE_DRIVER += -Wno-cast-qual
25 CFLAGS_BASE_DRIVER += -Wno-unused-function
26 CFLAGS_BASE_DRIVER += -Wno-unused-variable
27 CFLAGS_BASE_DRIVER += -Wno-strict-aliasing
28 CFLAGS_BASE_DRIVER += -Wno-missing-prototypes
29 CFLAGS_BASE_DRIVER += -Wno-format-nonliteral
30 ifeq ($(OS_TYPE),Linux)
31 ifeq ($(shell clang -Wno-shift-negative-value -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0)
32 CFLAGS_BASE_DRIVER += -Wno-shift-negative-value
36 ifneq (,$(filter gcc gcc48,$(CC)))
37 CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
38 CFLAGS_BASE_DRIVER += -Wno-missing-declarations
39 CFLAGS_BASE_DRIVER += -Wno-maybe-uninitialized
40 CFLAGS_BASE_DRIVER += -Wno-strict-prototypes
41 else ifeq ($(CC), clang)
42 CFLAGS_BASE_DRIVER += -Wno-format-extra-args
43 CFLAGS_BASE_DRIVER += -Wno-visibility
44 CFLAGS_BASE_DRIVER += -Wno-empty-body
45 CFLAGS_BASE_DRIVER += -Wno-invalid-source-encoding
46 CFLAGS_BASE_DRIVER += -Wno-sometimes-uninitialized
47 ifeq ($(shell clang -Wno-pointer-bool-conversion -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0)
48 CFLAGS_BASE_DRIVER += -Wno-pointer-bool-conversion
55 # Add extra flags for base ecore driver files
56 # to disable warnings in them
59 BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
60 $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS+=$(CFLAGS_BASE_DRIVER)))
63 # all source are stored in SRCS-y
65 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_dev.c
66 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_hw.c
67 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_cxt.c
68 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_sp_commands.c
69 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_init_fw_funcs.c
70 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_spq.c
71 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_init_ops.c
72 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_mcp.c
73 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_int.c
74 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/bcm_osal.c
77 DEPDIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += lib/librte_eal lib/librte_ether
78 DEPDIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += lib/librte_mempool lib/librte_mbuf
79 DEPDIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += lib/librte_net lib/librte_malloc
81 include $(RTE_SDK)/mk/rte.lib.mk