-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
69 lines (40 loc) · 845 Bytes
/
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
PROJECT := wutag
.PHONY: all
all: clean test build
.PHONY: all_debug
all_debug: clean test build_debug
.PHONY: run_debug
run_debug: build_debug
@./target/debug/$(PROJECT)
.PHONY: run
run: build
@./target/release/$(PROJECT)
.PHONY: build_debug
build_debug: ./target/debug/$(PROJECT)
.PHONY: build
build: ./target/release/$(PROJECT)
.PHONY: lint
lint: fmt_check clippy
.PHONY: check
check:
cargo check --all
.PHONY: test
test:
cargo t --all-targets --all-features
.PHONY: fmt_check
fmt_check:
cargo fmt --all -- --check
.PHONY: fmt
fmt:
cargo fmt --all
.PHONY: clippy
clippy:
@rustup component add clippy
cargo clippy --all-targets --all-features -- -D clippy::all
.PHONY: clean
clean:
@rm -rf target/*
./target/debug/$(PROJECT):
cargo build --bins
./target/release/$(PROJECT):
cargo build --release --bins