1SKELETONS = rss.bpf.skeleton.h 2 3LLVM_STRIP ?= llvm-strip 4CLANG ?= clang 5INC_FLAGS = `$(CLANG) -print-file-name=include` 6EXTRA_CFLAGS ?= -O2 -g -target bpf 7 8all: $(SKELETONS) 9 10.PHONY: clean 11 12clean: 13 rm -f $(SKELETONS) $(SKELETONS:%.skeleton.h=%.o) 14 15%.o: %.c 16 $(CLANG) $(INC_FLAGS) \ 17 -D__KERNEL__ -D__ASM_SYSREG_H \ 18 -I../include $(LINUXINCLUDE) \ 19 $(EXTRA_CFLAGS) -c $< -o $@ 20 $(LLVM_STRIP) -g $@ 21 22%.skeleton.h: %.o 23 bpftool gen skeleton $< > $@ 24 cp $@ ../../ebpf/ 25