-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5f2444
commit 4a5dce6
Showing
4 changed files
with
44 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.PHONY: local | ||
local: | ||
cargo build --release | ||
|
||
.PHONY: run | ||
run: | ||
ifndef ARGS | ||
@echo Run "make run" with ARGS set to pass arguments… | ||
endif | ||
cargo run --release -- $(ARGS) | ||
|
||
.PHONY: build-linux | ||
build-linux: | ||
cargo build --target x86_64-unknown-linux-musl --release --locked | ||
strip target/x86_64-unknown-linux-musl/release/api | ||
upx --lzma target/x86_64-unknown-linux-musl/release/api | ||
strip target/x86_64-unknown-linux-musl/release/cli | ||
upx --lzma target/x86_64-unknown-linux-musl/release/cli | ||
|
||
.PHONY: build-win | ||
build-win: | ||
RUSTFLAGS="-C linker=x86_64-w64-mingw32-gcc" cargo build --target x86_64-pc-windows-gnu --release --locked | ||
strip target/x86_64-pc-windows-gnu/release/api.exe | ||
upx --lzma target/x86_64-pc-windows-gnu/release/api.exe | ||
strip target/x86_64-pc-windows-gnu/release/cli.exe | ||
upx --lzma target/x86_64-pc-windows-gnu/release/cli.exe | ||
|
||
.PHONY: build-mac | ||
build-mac: | ||
cargo build --target x86_64-apple-darwin --release --locked | ||
strip target/x86_64-apple-darwin/release/api | ||
upx --lzma target/x86_64-apple-darwin/release/api | ||
strip target/x86_64-apple-darwin/release/cli | ||
upx --lzma target/x86_64-apple-darwin/release/cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters