1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2017 Cavium, Inc
5 include $(RTE_SDK)/mk/rte.vars.mk
10 LIB = librte_pmd_octeontx.a
12 CFLAGS += $(WERROR_FLAGS)
13 CFLAGS += -I$(RTE_SDK)/drivers/common/octeontx/
14 CFLAGS += -I$(RTE_SDK)/drivers/mempool/octeontx/
16 EXPORT_MAP := rte_pmd_octeontx_version.map
18 OBJS_BASE_DRIVER=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
19 $(foreach obj, $(OBJS_BASE_DRIVER), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
21 VPATH += $(SRCDIR)/base
24 # all source are stored in SRCS-y
26 SRCS-$(CONFIG_RTE_LIBRTE_OCTEONTX_PMD) += octeontx_rxtx.c
27 SRCS-$(CONFIG_RTE_LIBRTE_OCTEONTX_PMD) += octeontx_pkovf.c
28 SRCS-$(CONFIG_RTE_LIBRTE_OCTEONTX_PMD) += octeontx_pkivf.c
29 SRCS-$(CONFIG_RTE_LIBRTE_OCTEONTX_PMD) += octeontx_bgx.c
30 SRCS-$(CONFIG_RTE_LIBRTE_OCTEONTX_PMD) += octeontx_ethdev.c
31 SRCS-$(CONFIG_RTE_LIBRTE_OCTEONTX_PMD) += octeontx_ethdev_ops.c
33 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
34 CFLAGS_octeontx_rxtx.o += -fno-prefetch-loop-arrays
36 ifeq ($(shell test $(GCC_VERSION) -ge 46 && echo 1), 1)
37 CFLAGS_octeontx_rxtx.o += -O3 -Ofast
39 CFLAGS_octeontx_rxtx.o += -O3 -ffast-math
43 CFLAGS_octeontx_rxtx.o += -O3 -Ofast
46 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
47 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_common_octeontx
48 LDLIBS += -lrte_mempool_octeontx
49 LDLIBS += -lrte_eventdev
50 LDLIBS += -lrte_bus_pci
51 LDLIBS += -lrte_bus_vdev
53 include $(RTE_SDK)/mk/rte.lib.mk