xref: /linux-tools/ebpf/libbpf-bootstrap/README.MD (revision 1059921424b6397035e763e64200e08fbdc7d1cc)
1# Build
2
3- clone libbpf-bootstrap
4```
5git clone https://github.com/libbpf/libbpf-bootstrap.git
6```
7- copy codes in this directory to `libbpf-bootstrap/examples/c/`
8
9- change the Makefile
10
11```
12diff --git a/examples/c/Makefile b/examples/c/Makefile
13index e77fca7..2d8dc4b 100644
14--- a/examples/c/Makefile
15+++ b/examples/c/Makefile
16@@ -19,7 +19,7 @@ INCLUDES := -I$(OUTPUT) -I../../libbpf/include/uapi -I$(dir $(VMLINUX))
17 CFLAGS := -g -Wall
18 ALL_LDFLAGS := $(LDFLAGS) $(EXTRA_LDFLAGS)
19
20-APPS = minimal minimal_legacy bootstrap uprobe kprobe fentry usdt
21+APPS = minimal minimal_legacy bootstrap uprobe kprobe fentry usdt openat conn commargv
22
23 CARGO ?= $(shell which cargo)
24 ifeq ($(strip $(CARGO)),)
25
26```
27
28- Build the binary with g++
29
30```
31CC=g++ make openat conn commargv
32```
33