diff --git a/source/tools/monitor/raptor/source/ebpf/src/bcc/Makefile b/source/tools/monitor/raptor/source/ebpf/src/bcc/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..789e80f5886f2b6e76daa62ab23f1a4e2793b90d --- /dev/null +++ b/source/tools/monitor/raptor/source/ebpf/src/bcc/Makefile @@ -0,0 +1,19 @@ +BCC_VERSION ?= b9554b585afe18540ba98dde5b667e5b4036f479 + +.PHONY: bcc +bcc: + test -d src || git clone http://github.com/korniltsev/bcc src + cd src && git checkout $(BCC_VERSION) + test -d src/build && rm -rf src/build || echo bcc src/build dir does not exits + mkdir src/build + cd src/build \ + && cmake ../build-syms \ + -DCMAKE_C_COMPILER=clang \ + -DCMAKE_CXX_COMPILER=clang++ \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=$(shell pwd)/lib \ + && make -j16 install + +.PHONY: clean +clean: + rm -rf src lib diff --git a/source/tools/monitor/raptor/source/ebpf/src/libbpf/Makefile b/source/tools/monitor/raptor/source/ebpf/src/libbpf/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..f03149b2a719fba24ca760a9326232ac784d300a --- /dev/null +++ b/source/tools/monitor/raptor/source/ebpf/src/libbpf/Makefile @@ -0,0 +1,14 @@ +LIBBPF_VERSION ?= v0.8.1 + +.PHONY: libbpf +libbpf: + test -d src || git clone http://github.com/libbpf/libbpf src + #test -d src || git clone git@github.com:libbpf/libbpf.git src + cd src && git checkout $(LIBBPF_VERSION) + #fix the low gcc version complie error + $(shell sed -i 's/int i, err;/int i, err = 0;/g' src/src/btf_dump.c) + PREFIX=$(shell pwd)/lib make -C src/src -j16 install + +.PHONY: clean +clean: + rm -rf src lib