xref: /f-stack/dpdk/lib/librte_bpf/meson.build (revision 2d9fd380)
1# SPDX-License-Identifier: BSD-3-Clause
2# Copyright(c) 2018 Intel Corporation
3
4sources = files('bpf.c',
5		'bpf_exec.c',
6		'bpf_load.c',
7		'bpf_pkt.c',
8		'bpf_validate.c')
9
10if arch_subdir == 'x86' and dpdk_conf.get('RTE_ARCH_64')
11	sources += files('bpf_jit_x86.c')
12elif dpdk_conf.has('RTE_ARCH_ARM64')
13	sources += files('bpf_jit_arm64.c')
14endif
15
16headers = files('bpf_def.h',
17		'rte_bpf.h',
18		'rte_bpf_ethdev.h')
19
20deps += ['mbuf', 'net', 'ethdev']
21
22dep = dependency('libelf', required: false)
23if dep.found()
24	dpdk_conf.set('RTE_LIBRTE_BPF_ELF', 1)
25	sources += files('bpf_load_elf.c')
26	ext_deps += dep
27endif
28