-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (33 loc) · 1.01 KB
/
Makefile
File metadata and controls
44 lines (33 loc) · 1.01 KB
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
# Usage:
# make # build (debug)
# make run # cargo run (debug)
# make release # optimized build
# make test # run unit + integration tests
# make fmt # check & auto‑format
# make clippy # full‑feature lint, deny warnings
# make doc # build docs
# make clean # remove target dir
# ----------------------------------------------------
CARGO ?= cargo
FEATURES ?= --all-features
TARGETS ?= --all-targets
PROFILE ?= dev # override with `make PROFILE=release build`
CLIPPY_FLAGS ?= $(TARGETS) $(FEATURES) --workspace --profile dev -- -D warnings
FMT_FLAGS ?= --all
.PHONY: build release run test clean fmt clippy default
default: build
#-------------------- Core tasks --------------------
build:
$(CARGO) build --profile $(PROFILE)
release:
$(CARGO) build --release
run:
$(CARGO) run --bin zenith-builder-example
test:
$(CARGO) test
clean:
$(CARGO) clean
fmt:
$(CARGO) fmt
clippy:
$(CARGO) clippy $(CLIPPY_FLAGS)