common/mlx5: move some getter functions from net driver
[dpdk.git] / drivers / net / octeontx / Makefile
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2017 Cavium, Inc
3 #
4
5 include $(RTE_SDK)/mk/rte.vars.mk
6
7 #
8 # library name
9 #
10 LIB = librte_pmd_octeontx.a
11
12 CFLAGS += $(WERROR_FLAGS)
13 CFLAGS += -I$(RTE_SDK)/drivers/common/octeontx/
14 CFLAGS += -I$(RTE_SDK)/drivers/mempool/octeontx/
15
16 EXPORT_MAP := rte_pmd_octeontx_version.map
17
18 OBJS_BASE_DRIVER=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
19 $(foreach obj, $(OBJS_BASE_DRIVER), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
20
21 VPATH += $(SRCDIR)/base
22
23 #
24 # all source are stored in SRCS-y
25 #
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
32
33 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
34 CFLAGS_octeontx_rxtx.o += -fno-prefetch-loop-arrays
35
36 ifeq ($(shell test $(GCC_VERSION) -ge 46 && echo 1), 1)
37 CFLAGS_octeontx_rxtx.o += -O3 -Ofast
38 else
39 CFLAGS_octeontx_rxtx.o += -O3 -ffast-math
40 endif
41
42 else
43 CFLAGS_octeontx_rxtx.o += -O3 -Ofast
44 endif
45
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
52
53 include $(RTE_SDK)/mk/rte.lib.mk