qede: add L2 support
[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-unused-value
31 CFLAGS_BASE_DRIVER += -Wno-sign-compare
32 CFLAGS_BASE_DRIVER += -Wno-missing-prototypes
33 CFLAGS_BASE_DRIVER += -Wno-cast-qual
34 CFLAGS_BASE_DRIVER += -Wno-unused-function
35 CFLAGS_BASE_DRIVER += -Wno-unused-variable
36 CFLAGS_BASE_DRIVER += -Wno-strict-aliasing
37 CFLAGS_BASE_DRIVER += -Wno-missing-prototypes
38 CFLAGS_BASE_DRIVER += -Wno-format-nonliteral
39 ifeq ($(OS_TYPE),Linux)
40 ifeq ($(shell clang -Wno-shift-negative-value -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0)
41 CFLAGS_BASE_DRIVER += -Wno-shift-negative-value
42 endif
43 endif
44
45 ifneq (,$(filter gcc gcc48,$(CC)))
46 CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
47 CFLAGS_BASE_DRIVER += -Wno-missing-declarations
48 CFLAGS_BASE_DRIVER += -Wno-maybe-uninitialized
49 CFLAGS_BASE_DRIVER += -Wno-strict-prototypes
50 else ifeq ($(CC), clang)
51 CFLAGS_BASE_DRIVER += -Wno-format-extra-args
52 CFLAGS_BASE_DRIVER += -Wno-visibility
53 CFLAGS_BASE_DRIVER += -Wno-empty-body
54 CFLAGS_BASE_DRIVER += -Wno-invalid-source-encoding
55 CFLAGS_BASE_DRIVER += -Wno-sometimes-uninitialized
56 ifeq ($(shell clang -Wno-pointer-bool-conversion -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0)
57 CFLAGS_BASE_DRIVER += -Wno-pointer-bool-conversion
58 endif
59 else
60 #icc flags
61 endif
62
63 #
64 # Add extra flags for base ecore driver files
65 # to disable warnings in them
66 #
67 #
68 BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
69 $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS+=$(CFLAGS_BASE_DRIVER)))
70
71 #
72 # all source are stored in SRCS-y
73 #
74 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_dev.c
75 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_hw.c
76 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_cxt.c
77 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_l2.c
78 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_sp_commands.c
79 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_init_fw_funcs.c
80 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_spq.c
81 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_init_ops.c
82 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_mcp.c
83 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_int.c
84 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/bcm_osal.c
85 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_ethdev.c
86 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_eth_if.c
87 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_main.c
88 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_rxtx.c
89
90 # dependent libs:
91 DEPDIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += lib/librte_eal lib/librte_ether
92 DEPDIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += lib/librte_mempool lib/librte_mbuf
93 DEPDIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += lib/librte_net lib/librte_malloc
94
95 include $(RTE_SDK)/mk/rte.lib.mk