1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2016 Intel Corporation
4 include $(RTE_SDK)/mk/rte.vars.mk
11 EXPORT_MAP := rte_pmd_tap_version.map
14 # TAP_MAX_QUEUES must be a power of 2
16 ifeq ($(TAP_MAX_QUEUES),)
22 CFLAGS += $(WERROR_FLAGS)
23 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
24 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash
25 LDLIBS += -lrte_bus_vdev -lrte_gso
27 CFLAGS += -DTAP_MAX_QUEUES=$(TAP_MAX_QUEUES)
30 # all source are stored in SRCS-y
32 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += rte_eth_tap.c
33 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_flow.c
34 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_netlink.c
35 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_tcmsgs.c
36 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_bpf_api.c
37 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_intr.c
39 include $(RTE_SDK)/mk/rte.lib.mk
41 # Generate and clean-up tap_autoconf.h.
43 export CC CFLAGS CPPFLAGS EXTRA_CFLAGS EXTRA_CPPFLAGS
44 export AUTO_CONFIG_CFLAGS = -Wno-error
47 AUTOCONF_OUTPUT := >/dev/null
50 tap_autoconf.h.new: FORCE
52 tap_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh
57 enum TCA_FLOWER_UNSPEC \
62 enum TCA_FLOWER_KEY_VLAN_PRIO \
76 linux/tc_act/tc_bpf.h \
77 enum TCA_ACT_BPF_UNSPEC \
81 linux/tc_act/tc_bpf.h \
85 # Create tap_autoconf.h or update it in case it differs from the new one.
87 tap_autoconf.h: tap_autoconf.h.new
89 cmp '$<' '$@' $(AUTOCONF_OUTPUT) || \
92 $(SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP):.c=.o): tap_autoconf.h
95 $Q rm -f -- tap_autoconf.h tap_autoconf.h.new