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
16 # TAP_MAX_QUEUES must be a power of 2
18 ifeq ($(TAP_MAX_QUEUES),)
24 CFLAGS += $(WERROR_FLAGS)
25 CFLAGS += -DALLOW_EXPERIMENTAL_API
26 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
27 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash
28 LDLIBS += -lrte_bus_vdev -lrte_gso
30 CFLAGS += -DTAP_MAX_QUEUES=$(TAP_MAX_QUEUES)
33 # all source are stored in SRCS-y
35 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += rte_eth_tap.c
36 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_flow.c
37 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_netlink.c
38 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_tcmsgs.c
39 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_bpf_api.c
40 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_intr.c
42 include $(RTE_SDK)/mk/rte.lib.mk
44 # Generate and clean-up tap_autoconf.h.
46 export CC CFLAGS CPPFLAGS EXTRA_CFLAGS EXTRA_CPPFLAGS
47 export AUTO_CONFIG_CFLAGS = -Wno-error
50 AUTOCONF_OUTPUT := >/dev/null
53 tap_autoconf.h.new: FORCE
55 tap_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh
60 enum TCA_FLOWER_UNSPEC \
65 enum TCA_FLOWER_KEY_VLAN_PRIO \
79 linux/tc_act/tc_bpf.h \
80 enum TCA_ACT_BPF_UNSPEC \
84 linux/tc_act/tc_bpf.h \
88 # Create tap_autoconf.h or update it in case it differs from the new one.
90 tap_autoconf.h: tap_autoconf.h.new
92 cmp '$<' '$@' $(AUTOCONF_OUTPUT) || \
95 $(SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP):.c=.o): tap_autoconf.h
98 $Q rm -f -- tap_autoconf.h tap_autoconf.h.new