This repository has been archived by the owner on Sep 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
54 lines (43 loc) · 1.67 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
DIR := $(shell pwd)
all: build-all
build-all: build-osx build-linux build-windows build-linux-arm build-linux-arm64
build-linux-all: build-linux build-linux-arm build-linux-arm64
build-osx:
rustup default nightly
cargo build --release
build-linux:
rustup default nightly
rustup target add x86_64-unknown-linux-gnu
cargo build --target=x86_64-unknown-linux-gnu --release
build-windows:
rustup default nightly
cargo build --release
build-linux-arm:
rustup default nightly
rustup target add arm-unknown-linux-gnueabi
BINDGEN_EXTRA_CLANG_ARGS='--sysroot /usr/arm-linux-gnueabi' cargo build --target arm-unknown-linux-gnueabi --lib --release
build-linux-arm64:
rustup default nightly
rustup target add aarch64-unknown-linux-gnu
BINDGEN_EXTRA_CLANG_ARGS='--sysroot /usr/aarch64-linux-gnu' cargo build --target aarch64-unknown-linux-gnu --lib --release
osx-dir:
@mkdir -p runtimes/osx-arm64/native
@mkdir -p runtimes/osx-x64/native
@cp ./target/release/librust_verkle.dylib ./runtimes/osx-arm64/native/.
@cp ./target/release/librust_verkle.dylib ./runtimes/osx-x64/native/.
win-dir:
@mkdir -p runtimes/win-x64/native
@cp ./target/release/rust_verkle.dll ./runtimes/win-x64/native/.
linux-dir:
@mkdir -p runtimes/linux-arm64/native
@mkdir -p runtimes/linux-arm/native
@mkdir -p runtimes/linux-x64/native
@cp ./target/arm-unknown-linux-gnueabi/release/librust_verkle.so ./runtimes/linux-arm/native/.
@cp ./target/aarch64-unknown-linux-gnu/release/librust_verkle.so ./runtimes/linux-arm64/native/.
@cp ./target/x86_64-unknown-linux-gnu/release/librust_verkle.so ./runtimes/linux-x64/native/.
clean:
# rm -rf target
# rm -rf build
# rm -rf Cargo.lock
# rm -rf osxcross
# rm -rf runtimes