net/qede: refactoring multi-queue implementation
[dpdk.git] / drivers / net / qede / Makefile
1 #    Copyright (c) 2016 QLogic Corporation.
2 #    All rights reserved.
3 #    www.qlogic.com
4 #
5 #    See LICENSE.qede_pmd for copyright and licensing details.
6
7 include $(RTE_SDK)/mk/rte.vars.mk
8
9 #
10 # library name
11 #
12 LIB = librte_pmd_qede.a
13
14 CFLAGS += -O3
15 CFLAGS += $(WERROR_FLAGS)
16
17 EXPORT_MAP := rte_pmd_qede_version.map
18
19 LIBABIVER := 1
20
21 #
22 # OS
23 #
24 OS_TYPE := $(shell uname -s)
25
26 #
27 # CFLAGS
28 #
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
37
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
44 endif
45 endif
46 endif
47
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
51 endif
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
55 endif
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
61 endif
62 endif
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
71 endif
72 else
73 CFLAGS_BASE_DRIVER += -wd188 #188: enumerated type mixed with another type
74 endif
75
76 #
77 # Add extra flags for base ecore driver files
78 # to disable warnings in them
79 #
80 #
81 BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
82 $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
83
84 VPATH += $(SRCDIR)/base
85
86 #
87 # all source are stored in SRCS-y
88 #
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
107
108 include $(RTE_SDK)/mk/rte.lib.mk