1# SPDX-License-Identifier: BSD-3-Clause 2# Copyright(c) 2018 Intel Corporation 3 4allow_experimental_apis = true 5sources = files('bpf.c', 6 'bpf_exec.c', 7 'bpf_load.c', 8 'bpf_pkt.c', 9 'bpf_validate.c') 10 11if arch_subdir == 'x86' and cc.sizeof('void *') == 8 12 sources += files('bpf_jit_x86.c') 13endif 14 15install_headers = files('bpf_def.h', 16 'rte_bpf.h', 17 'rte_bpf_ethdev.h') 18 19deps += ['mbuf', 'net', 'ethdev'] 20 21dep = cc.find_library('elf', required: false) 22if dep.found() == true and cc.has_header('libelf.h', dependencies: dep) 23 sources += files('bpf_load_elf.c') 24 ext_deps += dep 25endif 26