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 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
26 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash
27 LDLIBS += -lrte_bus_vdev -lrte_gso
29 CFLAGS += -DTAP_MAX_QUEUES=$(TAP_MAX_QUEUES)
32 # all source are stored in SRCS-y
34 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += rte_eth_tap.c
35 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_flow.c
36 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_netlink.c
37 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_tcmsgs.c
38 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_bpf_api.c
39 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_intr.c
41 include $(RTE_SDK)/mk/rte.lib.mk
43 # Generate and clean-up tap_autoconf.h.
45 export CC CFLAGS CPPFLAGS EXTRA_CFLAGS EXTRA_CPPFLAGS
46 export AUTO_CONFIG_CFLAGS = -Wno-error
49 AUTOCONF_OUTPUT := >/dev/null
52 tap_autoconf.h.new: FORCE
54 tap_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh
59 enum TCA_FLOWER_UNSPEC \
64 enum TCA_FLOWER_KEY_VLAN_PRIO \
78 linux/tc_act/tc_bpf.h \
79 enum TCA_ACT_BPF_UNSPEC \
83 linux/tc_act/tc_bpf.h \
87 # Create tap_autoconf.h or update it in case it differs from the new one.
89 tap_autoconf.h: tap_autoconf.h.new
91 cmp '$<' '$@' $(AUTOCONF_OUTPUT) || \
94 $(SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP):.c=.o): tap_autoconf.h
97 $Q rm -f -- tap_autoconf.h tap_autoconf.h.new