summaryrefslogtreecommitdiff
path: root/internal/c/Makefile
blob: 196b2d3281dac4c456ab797d34cdbfaa43b0c660 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
export LIBBPFGO = $(CURDIR)/../../../libbpfgo
export CC = clang

all: bpfbuild

.PHONY: bpfbuild
bpfbuild:
	bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h
	$(CC) -g -O2 -Wall -fpie -target bpf -D__TARGET_ARCH_amd64 -I$(LIBBPFGO)/output -c ioriotng.bpf.c -o ioriotng.bpf.o

.PHONY: clean
clean:
	find . -name \*.o -delete
	find . -name vmlinux.h -delete