net: fix build with sparse on L2TPv2 bitfields
[dpdk.git] / lib / bpf / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2018 Intel Corporation
3
4 if is_windows
5     build = false
6     reason = 'not supported on Windows'
7     subdir_done()
8 endif
9
10 sources = files('bpf.c',
11         'bpf_dump.c',
12         'bpf_exec.c',
13         'bpf_load.c',
14         'bpf_pkt.c',
15         'bpf_stub.c',
16         'bpf_validate.c')
17
18 if arch_subdir == 'x86' and dpdk_conf.get('RTE_ARCH_64')
19     sources += files('bpf_jit_x86.c')
20 elif dpdk_conf.has('RTE_ARCH_ARM64')
21     sources += files('bpf_jit_arm64.c')
22 endif
23
24 headers = files('bpf_def.h',
25         'rte_bpf.h',
26         'rte_bpf_ethdev.h')
27
28 deps += ['mbuf', 'net', 'ethdev']
29
30 dep = dependency('libelf', required: false, method: 'pkg-config')
31 if dep.found()
32     dpdk_conf.set('RTE_LIBRTE_BPF_ELF', 1)
33     sources += files('bpf_load_elf.c')
34     ext_deps += dep
35 else
36      warning('libelf is missing, rte_bpf_elf_load API will be disabled')
37 endif
38
39 if dpdk_conf.has('RTE_PORT_PCAP')
40     sources += files('bpf_convert.c')
41     ext_deps += pcap_dep
42 else
43      warning('RTE_PORT_PCAP is missing, rte_bpf_convert API will be disabled')
44 endif