1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
| | # SPDX-License-Identifier: EUPL-1.2+
# SPDX-FileCopyrightText: 2025 Yureka Lilian <yureka@cyberchaos.dev>
libbpf = dependency('libbpf', version : '1.6.2')
executable('set_router_iface', 'set_router_iface.c',
dependencies : libbpf,
install : true)
clang = find_program('clang')
bpf_o_cmd = [
clang.full_path(),
'-fno-stack-protector',
'-O2',
'-target', 'bpf',
'-I', meson.current_source_dir() + '/include',
'-g',
'-c',
'@INPUT@',
'-o',
'@OUTPUT@',
]
prog_router_o = custom_target(
input : 'prog_router.c',
output : 'prog_router.o',
command : bpf_o_cmd,
install: true,
install_dir: 'lib/xdp')
prog_physical_o = custom_target(
input : 'prog_physical.c',
output : 'prog_physical.o',
command : bpf_o_cmd,
install: true,
install_dir: 'lib/xdp')
|