-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (24 loc) · 1.1 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
TARGET=gh-mozhu
dist: default drawin-x86 drawin-aarch64 linux windows
default:
cargo build -r
cp ./target/release/${TARGET} ${TARGET}
linux:
cargo build -r --target=x86_64-unknown-linux-gnu
cp ./target/x86_64-unknown-linux-gnu/release/${TARGET} ${TARGET}-linux-amd64
windows:
cargo build -r --target=x86_64-pc-windows-gnu
cp ./target/x86_64-pc-windows-gnu/release/${TARGET}.exe ${TARGET}-windows-amd64.exe
drawin-x86:
SDKROOT=/opt/MacOSX13.3.sdk \
PATH="$$PATH:~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/" \
CARGO_TARGET_X86_64_APPLE_DARWIN_LINKER=rust-lld \
cargo build -r --target=x86_64-apple-darwin
cp ./target/x86_64-apple-darwin/release/${TARGET} ${TARGET}-darwin-amd64
drawin-aarch64:
SDKROOT=/opt/MacOSX13.3.sdk \
CARGO_TARGET_AARCH64_APPLE_DARWIN_LINKER=rust-lld \
CARGO_TARGET_X86_64_APPLE_DARWIN_LINKER=rust-lld \
PATH="$$PATH:~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/" \
cargo build -r --target=aarch64-apple-darwin
cp ./target/aarch64-apple-darwin/release/${TARGET} ${TARGET}-darwin-arm64