-
Notifications
You must be signed in to change notification settings - Fork 44
/
Makefile
47 lines (36 loc) · 980 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
# The location of cargo bin (e.g. /usr/bin/cargo)
CARGO_BIN = cargo
# Any options for cargo
CARGO_OPTS =
# The full command to run cargo
CARGO = $(CARGO_BIN) $(CARGO_OPTS)
# Main make command - build, test and run the app
all: clean build test doc run
# Run the program, will first comile if needed
run: build
$(CARGO) run
# Compile the source and dependencies
build:
$(CARGO) build --all-features
# Run the unit and rustdoc tests
test: build
$(CARGO) test --all-features
# Execute benchmkark tests
bench: build
$(CARGO) bench
# Generate documentation from rustdoc
doc:
$(CARGO) doc --no-deps --all-features
# Check the source for compilation errors
check:
$(CARGO) check --all-features
# Format all bin + lib files
fmt:
$(CARGO) fmt -- --check
# Check for common mistakes, and improvments
clippy:
$(CARGO) clippy -- -D warnings
# Remove the target directory and compiled files
clean:
$(CARGO) clean
.PHONY: all run build clean check test bench doc fmt clippy