net/mlx5: add VLAN push/pop DR commands to glue
[dpdk.git] / drivers / net / qede / Makefile
1 #    SPDX-License-Identifier: BSD-3-Clause
2 #    Copyright (c) 2016 - 2018 Cavium Inc.
3 #    All rights reserved.
4 #    www.cavium.com
5
6 include $(RTE_SDK)/mk/rte.vars.mk
7
8 #
9 # library name
10 #
11 LIB = librte_pmd_qede.a
12
13 CFLAGS += -O3
14 CFLAGS += $(WERROR_FLAGS)
15 CFLAGS += -DALLOW_EXPERIMENTAL_API
16 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
17 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
18 LDLIBS += -lrte_bus_pci
19
20 EXPORT_MAP := rte_pmd_qede_version.map
21
22 LIBABIVER := 1
23
24 #
25 # OS
26 #
27 OS_TYPE := $(shell uname -s)
28
29 #
30 # CFLAGS
31 #
32 CFLAGS_BASE_DRIVER = -Wno-unused-parameter
33 CFLAGS_BASE_DRIVER += -Wno-sign-compare
34 CFLAGS_BASE_DRIVER += -Wno-missing-prototypes
35 CFLAGS_BASE_DRIVER += -Wno-cast-qual
36 CFLAGS_BASE_DRIVER += -Wno-unused-function
37 CFLAGS_BASE_DRIVER += -Wno-unused-variable
38 CFLAGS_BASE_DRIVER += -Wno-strict-aliasing
39 CFLAGS_BASE_DRIVER += -Wno-missing-prototypes
40
41 ifneq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
42 CFLAGS_BASE_DRIVER += -Wno-unused-value
43 CFLAGS_BASE_DRIVER += -Wno-format-nonliteral
44 ifeq ($(OS_TYPE),Linux)
45 ifeq ($(shell clang -Wno-shift-negative-value -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0)
46 CFLAGS_BASE_DRIVER += -Wno-shift-negative-value
47 endif
48 endif
49 endif
50
51 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
52 ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1)
53 CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
54 endif
55 CFLAGS_BASE_DRIVER += -Wno-missing-declarations
56 ifeq ($(shell test $(GCC_VERSION) -ge 46 && echo 1), 1)
57 CFLAGS_BASE_DRIVER += -Wno-maybe-uninitialized
58 endif
59 CFLAGS_BASE_DRIVER += -Wno-strict-prototypes
60 ifeq ($(shell test $(GCC_VERSION) -ge 60 && echo 1), 1)
61 CFLAGS_BASE_DRIVER += -Wno-shift-negative-value
62 ifeq ($(shell test $(GCC_VERSION) -ge 70 && echo 1), 1)
63 CFLAGS_BASE_DRIVER += -Wno-implicit-fallthrough
64 endif
65 endif
66 else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
67 CFLAGS_BASE_DRIVER += -Wno-format-extra-args
68 CFLAGS_BASE_DRIVER += -Wno-visibility
69 CFLAGS_BASE_DRIVER += -Wno-empty-body
70 CFLAGS_BASE_DRIVER += -Wno-invalid-source-encoding
71 CFLAGS_BASE_DRIVER += -Wno-sometimes-uninitialized
72 ifeq ($(shell clang -Wno-pointer-bool-conversion -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0)
73 CFLAGS_BASE_DRIVER += -Wno-pointer-bool-conversion
74 endif
75 else #ICC
76 CFLAGS_qede_ethdev.o += -diag-disable 279 #279: controlling expression is constant
77 endif
78
79 #
80 # Add extra flags for base ecore driver files
81 # to disable warnings in them
82 #
83 #
84 BASE_DRIVER_OBJS=$(sort $(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c))))
85 $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
86
87 VPATH += $(SRCDIR)/base
88
89 #
90 # all source are stored in SRCS-y
91 #
92 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_dev.c
93 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_hw.c
94 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_cxt.c
95 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_l2.c
96 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_sp_commands.c
97 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_init_fw_funcs.c
98 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_spq.c
99 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_init_ops.c
100 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_mcp.c
101 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_int.c
102 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_dcbx.c
103 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += bcm_osal.c
104 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_sriov.c
105 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_vf.c
106 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_ethdev.c
107 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_main.c
108 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_rxtx.c
109 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_filter.c
110
111 include $(RTE_SDK)/mk/rte.lib.mk