1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2014-2018 Chelsio Communications.
5 include $(RTE_SDK)/mk/rte.vars.mk
10 LIB = librte_pmd_cxgbe.a
12 CFLAGS += -I$(SRCDIR)/base/
15 CFLAGS += $(WERROR_FLAGS)
17 EXPORT_MAP := rte_pmd_cxgbe_version.map
22 # CFLAGS for gcc/clang
24 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
25 ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1)
26 CFLAGS += -Wno-deprecated
30 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
31 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
32 LDLIBS += -lrte_bus_pci
35 # Add extra flags for base driver files (also known as shared code)
36 # to disable warnings in them
38 BASE_DRIVER_OBJS=$(sort $(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c))))
39 $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
41 VPATH += $(SRCDIR)/base
45 # all source are stored in SRCS-y
47 SRCS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += cxgbe_ethdev.c
48 SRCS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += cxgbevf_ethdev.c
49 SRCS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += cxgbe_main.c
50 SRCS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += cxgbevf_main.c
51 SRCS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += sge.c
52 SRCS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += cxgbe_filter.c
53 SRCS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += cxgbe_flow.c
54 SRCS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += t4_hw.c
55 SRCS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += clip_tbl.c
56 SRCS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += mps_tcam.c
57 SRCS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += l2t.c
58 SRCS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += t4vf_hw.c
60 include $(RTE_SDK)/mk/rte.lib.mk