drivers: use SPDX tag for Intel copyright files
[dpdk.git] / drivers / net / tap / Makefile
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2016 Intel Corporation
3
4 include $(RTE_SDK)/mk/rte.vars.mk
5
6 #
7 # library name
8 #
9 LIB = librte_pmd_tap.a
10
11 EXPORT_MAP := rte_pmd_tap_version.map
12
13 LIBABIVER := 1
14
15 CFLAGS += -O3
16 CFLAGS += -I$(SRCDIR)
17 CFLAGS += -I.
18 CFLAGS += $(WERROR_FLAGS)
19 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
20 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash
21 LDLIBS += -lrte_bus_vdev
22
23 #
24 # all source are stored in SRCS-y
25 #
26 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += rte_eth_tap.c
27 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_flow.c
28 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_netlink.c
29 SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_tcmsgs.c
30
31 include $(RTE_SDK)/mk/rte.lib.mk
32
33 # Generate and clean-up tap_autoconf.h.
34
35 export CC CFLAGS CPPFLAGS EXTRA_CFLAGS EXTRA_CPPFLAGS
36 export AUTO_CONFIG_CFLAGS = -Wno-error
37
38 ifndef V
39 AUTOCONF_OUTPUT := >/dev/null
40 endif
41
42 tap_autoconf.h.new: FORCE
43
44 tap_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh
45         $Q $(RM) -f -- '$@'
46         $Q sh -- '$<' '$@' \
47                 HAVE_TC_FLOWER \
48                 linux/pkt_cls.h \
49                 enum TCA_FLOWER_UNSPEC \
50                 $(AUTOCONF_OUTPUT)
51         $Q sh -- '$<' '$@' \
52                 HAVE_TC_VLAN_ID \
53                 linux/pkt_cls.h \
54                 enum TCA_FLOWER_KEY_VLAN_PRIO \
55                 $(AUTOCONF_OUTPUT)
56
57 # Create tap_autoconf.h or update it in case it differs from the new one.
58
59 tap_autoconf.h: tap_autoconf.h.new
60         $Q [ -f '$@' ] && \
61                 cmp '$<' '$@' $(AUTOCONF_OUTPUT) || \
62                 mv '$<' '$@'
63
64 $(SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP):.c=.o): tap_autoconf.h
65
66 clean_tap: FORCE
67         $Q rm -f -- tap_autoconf.h tap_autoconf.h.new
68
69 clean: clean_tap