-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
Makefile
33 lines (26 loc) · 948 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
build: build-rust build-cpp
build-rust:
$(MAKE) -C runtime/cli build
cp ./runtime/target/release/wasm-bpf ./wasm-bpf-rs
build-cpp:
$(MAKE) -C runtime/cpp build
cp ./runtime/cpp/build/bin/Release/wasm-bpf .
clean:
$(MAKE) -C examples clean
$(MAKE) -C runtime/cpp clean
$(MAKE) -C runtime/cli clean
rm -rf wasm-bpf-rs
rm -rf wasm-bpf
install-deps: ## install deps
apt update
apt-get install libcurl4-openssl-dev libelf-dev clang llvm pahole zlib1g-dev -y ## libgtest-dev
/opt/wasi-sdk:
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-17/wasi-sdk-17.0-linux.tar.gz
tar -zxf wasi-sdk-17.0-linux.tar.gz
sudo mkdir -p /opt/wasi-sdk/ && sudo mv wasi-sdk-17.0/* /opt/wasi-sdk/
tinygo:
wget https://github.com/tinygo-org/tinygo/releases/download/v0.27.0/tinygo_0.27.0_amd64.deb
sudo dpkg -i tinygo_0.27.0_amd64.deb
test:
rm -rf runtime/cpp/build
cd runtime/cpp && mkdir build && cd build && cmake .. && make