Add Makefile

So we can use make to build, check and test

Signed-off-by: Tim Zhang <tim@hyper.sh>
This commit is contained in:
Tim Zhang
2021-01-25 16:15:46 +08:00
parent 8448548cb3
commit 0c58b5dd84

37
Makefile Normal file
View File

@@ -0,0 +1,37 @@
all: debug fmt test
#
# Build
#
.PHONY: debug
debug:
RUSTFLAGS="--deny warnings" cargo build
.PHONY: release
release:
cargo build --release
.PHONY: build
build: debug
#
# Tests and linters
#
.PHONY: test
test:
cargo test -- --color always --nocapture
.PHONY: check
check: fmt clippy
.PHONY: fmt
fmt:
cargo fmt --all -- --check
.PHONY: clippy
clippy:
cargo clippy --all-targets --all-features -- -D warnings