net/qede/base: fix 32-bit build
[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 LDLIBS += -lz
18
19 EXPORT_MAP := rte_pmd_qede_version.map
20
21 LIBABIVER := 1
22
23 #
24 # OS
25 #
26 OS_TYPE := $(shell uname -s)
27
28 #
29 # CFLAGS
30 #
31 CFLAGS_BASE_DRIVER = -Wno-unused-parameter
32 CFLAGS_BASE_DRIVER += -Wno-sign-compare
33 CFLAGS_BASE_DRIVER += -Wno-missing-prototypes
34 CFLAGS_BASE_DRIVER += -Wno-cast-qual
35 CFLAGS_BASE_DRIVER += -Wno-unused-function
36 CFLAGS_BASE_DRIVER += -Wno-unused-variable
37 CFLAGS_BASE_DRIVER += -Wno-strict-aliasing
38 CFLAGS_BASE_DRIVER += -Wno-missing-prototypes
39
40 ifneq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
41 CFLAGS_BASE_DRIVER += -Wno-unused-value
42 CFLAGS_BASE_DRIVER += -Wno-format-nonliteral
43 ifeq ($(OS_TYPE),Linux)
44 ifeq ($(shell clang -Wno-shift-negative-value -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0)
45 CFLAGS_BASE_DRIVER += -Wno-shift-negative-value
46 endif
47 endif
48 endif
49
50 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
51 ifeq ($(shell gcc -Wno-unused-but-set-variable -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0)
52 CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
53 endif
54 CFLAGS_BASE_DRIVER += -Wno-missing-declarations
55 ifeq ($(shell gcc -Wno-maybe-uninitialized -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0)
56 CFLAGS_BASE_DRIVER += -Wno-maybe-uninitialized
57 endif
58 CFLAGS_BASE_DRIVER += -Wno-strict-prototypes
59 ifeq ($(shell test $(GCC_VERSION) -ge 60 && echo 1), 1)
60 CFLAGS_BASE_DRIVER += -Wno-shift-negative-value
61 endif
62 else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
63 CFLAGS_BASE_DRIVER += -Wno-format-extra-args
64 CFLAGS_BASE_DRIVER += -Wno-visibility
65 CFLAGS_BASE_DRIVER += -Wno-empty-body
66 CFLAGS_BASE_DRIVER += -Wno-invalid-source-encoding
67 CFLAGS_BASE_DRIVER += -Wno-sometimes-uninitialized
68 ifeq ($(shell clang -Wno-pointer-bool-conversion -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0)
69 CFLAGS_BASE_DRIVER += -Wno-pointer-bool-conversion
70 endif
71 else
72 CFLAGS_BASE_DRIVER += -wd188 #188: enumerated type mixed with another type
73 endif
74
75 #
76 # Add extra flags for base ecore driver files
77 # to disable warnings in them
78 #
79 #
80 BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
81 $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS+=$(CFLAGS_BASE_DRIVER)))
82
83 #
84 # all source are stored in SRCS-y
85 #
86 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_dev.c
87 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_hw.c
88 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_cxt.c
89 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_l2.c
90 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_sp_commands.c
91 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_init_fw_funcs.c
92 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_spq.c
93 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_init_ops.c
94 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_mcp.c
95 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_int.c
96 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_dcbx.c
97 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/bcm_osal.c
98 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_sriov.c
99 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_vf.c
100 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_ethdev.c
101 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_eth_if.c
102 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_main.c
103 SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_rxtx.c
104
105 # dependent libs:
106 DEPDIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += lib/librte_eal lib/librte_ether
107 DEPDIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += lib/librte_mempool lib/librte_mbuf
108 DEPDIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += lib/librte_net
109
110 include $(RTE_SDK)/mk/rte.lib.mk