You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/tools/ebpf/Makefile.ebpf

25 lines
510 B
Makefile

SKELETONS = rss.bpf.skeleton.h
LLVM_STRIP ?= llvm-strip
CLANG ?= clang
INC_FLAGS = `$(CLANG) -print-file-name=include`
EXTRA_CFLAGS ?= -O2 -g -target bpf
all: $(SKELETONS)
.PHONY: clean
clean:
rm -f $(SKELETONS) $(SKELETONS:%.skeleton.h=%.o)
%.o: %.c
$(CLANG) $(INC_FLAGS) \
-D__KERNEL__ -D__ASM_SYSREG_H \
-I../include $(LINUXINCLUDE) \
$(EXTRA_CFLAGS) -c $< -o $@
$(LLVM_STRIP) -g $@
%.skeleton.h: %.o
bpftool gen skeleton $< > $@
cp $@ ../../ebpf/