New upstream version 18.11-rc1
[deb_dpdk.git] / drivers / net / tap / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright 2018 Luca Boccassi <bluca@debian.org>
3
4 if host_machine.system() != 'linux'
5         build = false
6 endif
7 sources = files(
8         'rte_eth_tap.c',
9         'tap_bpf_api.c',
10         'tap_flow.c',
11         'tap_intr.c',
12         'tap_netlink.c',
13         'tap_tcmsgs.c',
14 )
15
16 deps = ['bus_vdev', 'gso', 'hash']
17
18 cflags += '-DTAP_MAX_QUEUES=16'
19
20 # To maintain the compatibility with the make build system
21 # tap_autoconf.h file is still generated.
22 # input array for meson symbol search:
23 # [ "MACRO to define if found", "header for the search",
24 #   "enum/define", "symbol to search" ]
25 #
26 args = [
27         [ 'HAVE_TC_FLOWER', 'linux/pkt_cls.h',
28           'TCA_FLOWER_UNSPEC' ],
29         [ 'HAVE_TC_VLAN_ID', 'linux/pkt_cls.h',
30           'TCA_FLOWER_KEY_VLAN_PRIO' ],
31         [ 'HAVE_TC_BPF', 'linux/pkt_cls.h',
32           'TCA_BPF_UNSPEC' ],
33         [ 'HAVE_TC_BPF_FD', 'linux/pkt_cls.h',
34           'TCA_BPF_FD' ],
35         [ 'HAVE_TC_ACT_BPF', 'linux/tc_act/tc_bpf.h',
36           'TCA_ACT_BPF_UNSPEC' ],
37         [ 'HAVE_TC_ACT_BPF_FD', 'linux/tc_act/tc_bpf.h',
38           'TCA_ACT_BPF_FD' ],
39 ]
40 config = configuration_data()
41 allow_experimental_apis = true
42 foreach arg:args
43         config.set(arg[0], cc.has_header_symbol(arg[1], arg[2]))
44 endforeach
45 configure_file(output : 'tap_autoconf.h', configuration : config)