bpf: add ability to load eBPF program from ELF object file
[dpdk.git] / lib / librte_bpf / meson.build
index 4fa000f..a6a9229 100644 (file)
@@ -11,3 +11,9 @@ install_headers = files('bpf_def.h',
                        'rte_bpf.h')
 
 deps += ['mbuf', 'net']
+
+dep = cc.find_library('elf', required: false)
+if dep.found() == true and cc.has_header('libelf.h', dependencies: dep)
+       sources += files('bpf_load_elf.c')
+       ext_deps += dep
+endif