1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright 2015 6WIND S.A.
3 # Copyright 2015 Mellanox Technologies, Ltd
5 include $(RTE_SDK)/mk/rte.vars.mk
8 LIB = librte_pmd_mlx5.a
11 SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5.c
12 SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5_rxq.c
13 SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5_txq.c
14 SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5_rxtx.c
15 ifneq ($(filter y,$(CONFIG_RTE_ARCH_X86_64) \
16 $(CONFIG_RTE_ARCH_PPC_64) \
17 $(CONFIG_RTE_ARCH_ARM64)),)
18 SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5_rxtx_vec.c
20 SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5_trigger.c
21 SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5_ethdev.c
22 SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5_mac.c
23 SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5_rxmode.c
24 SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5_vlan.c
25 SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5_stats.c
26 SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5_rss.c
27 SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5_mr.c
28 SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5_flow.c
29 SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5_flow_meter.c
30 SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5_flow_dv.c
31 SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5_flow_verbs.c
32 SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5_mp.c
33 SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5_utils.c
34 SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5_socket.c
38 CFLAGS += -std=c11 -Wall -Wextra
40 CFLAGS += -I$(RTE_SDK)/drivers/common/mlx5
41 CFLAGS += -I$(RTE_SDK)/drivers/net/mlx5
42 CFLAGS += -I$(BUILDDIR)/drivers/common/mlx5
43 CFLAGS += -D_BSD_SOURCE
44 CFLAGS += -D_DEFAULT_SOURCE
45 CFLAGS += -D_XOPEN_SOURCE=600
46 CFLAGS += $(WERROR_FLAGS)
47 CFLAGS += -Wno-strict-prototypes
48 LDLIBS += -lrte_common_mlx5
50 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
51 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
52 LDLIBS += -lrte_bus_pci
54 # A few warnings cannot be avoided in external headers.
55 CFLAGS += -Wno-error=cast-qual
57 EXPORT_MAP := rte_pmd_mlx5_version.map
59 # DEBUG which is usually provided on the command-line may enable
60 # CONFIG_RTE_LIBRTE_MLX5_DEBUG.
62 CONFIG_RTE_LIBRTE_MLX5_DEBUG := y
65 # User-defined CFLAGS.
66 ifeq ($(CONFIG_RTE_LIBRTE_MLX5_DEBUG),y)
68 ifneq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
71 AUTO_CONFIG_CFLAGS += -Wno-pedantic
76 include $(RTE_SDK)/mk/rte.lib.mk