-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathMakefile
43 lines (35 loc) · 887 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
.PHONY: all bootstrap runqlat
all: test
TEST_TIME := 3
# test with the files in bpf-loader
TEST_CASES_DIRS=$(shell ls -l . | grep ^d | grep -v 'go-lsm\|go-execve' | awk '{print $$9}')
test: $(TEST_CASES_DIRS)
.PHONY:$(TEST_CASES_DIRS)
# build the test cases
$(TEST_CASES_DIRS): wasm-bpf
make -C $@
make -C $@ test
clean:
for name in $(TEST_CASES_DIRS); do \
$(MAKE) -C $$name clean; \
done
rm -rf wasm-bpf
wasm-bpf:
case $$IMPL in \
cpp) \
make wasm-bpf-cpp \
;; \
rust) \
make wasm-bpf-rs \
;; \
*) \
echo "\e[31mNo runtime specified. Set env variable IMPL to either \"rust\" or \"cpp\" to specify which runtime to use\e[0m" && \
exit 1 \
;; \
esac
wasm-bpf-cpp:
make -C ../runtime/cpp
cp ../runtime/cpp/build/bin/Release/wasm-bpf .
wasm-bpf-rs:
cd ../runtime/cli && cargo build --release
cp ../runtime/target/release/wasm-bpf wasm-bpf