github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/pkg/agent/ebpfspy/bpf/Makefile (about)

     1  CLANG ?= clang
     2  
     3  CFLAGS := $(CFLAGS) -ggdb -gdwarf -O2 -Wall -fpie -Wno-unused-variable -Wno-unused-function
     4  
     5  
     6  profile.bpf.o: profile.bpf.c profile.bpf.h vmlinux.h
     7  	$(CLANG) $(CFLAGS) -target bpf -D__TARGET_ARCH_x86 -I. -c profile.bpf.c -o $@
     8  
     9  vmlinux.h:
    10  	wget https://raw.githubusercontent.com/iovisor/bcc/798a1056903b57687fd9d30a43c64c7a4402934c/libbpf-tools/x86/vmlinux_518.h -O $@
    11  
    12  .PHONY: clean
    13  clean:
    14  	rm -rf profile.bpf.o vmlinux.h