This repository has been archived by the owner on Oct 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.toml
51 lines (44 loc) · 1.56 KB
/
Makefile.toml
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
[env]
CARGO_MAKE_RUST_TARGET_TRIPLE = { value = "${BUILD_TARGET}", condition = { env_set = ["BUILD_TARGET"] } }
#
# Main commands
#
[tasks.build-release]
private = false
dependencies = ["build-lib-release"]
[tasks.build-all-release]
private = false
script_runner = "@shell"
script = '''
cargo make --env BUILD_TARGET=aarch64-linux-android -- build-release
cargo make --env BUILD_TARGET=armv7-linux-androideabi -- build-release
cargo make --env BUILD_TARGET=i686-linux-android -- build-release
cargo make --env BUILD_TARGET=x86_64-linux-android -- build-release
cargo make --env BUILD_TARGET=i686-unknown-linux-gnu -- build-release
cargo make --env BUILD_TARGET=x86_64-unknown-linux-gnu -- build-release
cargo make --env BUILD_TARGET=x86_64-apple-darwin -- build-release
cargo make --env BUILD_TARGET=aarch64-apple-ios -- build-release
cargo make --env BUILD_TARGET=i686-pc-windows-msvc -- build-release
cargo make --env BUILD_TARGET=x86_64-pc-windows-msvc -- build-release
cargo make --env BUILD_TARGET=wasm32-unknown-emscripten -- build-release
'''
#
# Release tasks
#
[tasks.build-crate-release]
private = true
script_runner = "@shell"
script = '''
cargo build --target $CARGO_MAKE_RUST_TARGET_TRIPLE --release
'''
[tasks.build-lib-release]
private = true
dependencies = ["build-crate-release"]
script_runner = "@shell"
script = '''
if [[ -f ./lib/$CARGO_MAKE_RUST_TARGET_TRIPLE/*.so ]]; then
rm ./lib/$CARGO_MAKE_RUST_TARGET_TRIPLE/*.so
fi
mkdir -p ./lib/$CARGO_MAKE_RUST_TARGET_TRIPLE
cp ./target/$CARGO_MAKE_RUST_TARGET_TRIPLE/release/*.so ./lib/$CARGO_MAKE_RUST_TARGET_TRIPLE
'''