Skip to content

Commit ca5a06e

Browse files
committed
adds makefile for common repo actions
1 parent 804c1ee commit ca5a06e

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

Makefile

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Usage:
2+
# make # build (debug)
3+
# make run # cargo run (debug)
4+
# make release # optimized build
5+
# make test # run unit + integration tests
6+
# make fmt # check & auto‑format
7+
# make clippy # full‑feature lint, deny warnings
8+
# make doc # build docs
9+
# make clean # remove target dir
10+
# ----------------------------------------------------
11+
12+
CARGO ?= cargo
13+
FEATURES ?= --all-features
14+
TARGETS ?= --all-targets
15+
PROFILE ?= dev # override with `make PROFILE=release build`
16+
CLIPPY_FLAGS ?= $(TARGETS) $(FEATURES) --workspace --profile dev -- -D warnings
17+
FMT_FLAGS ?= --all
18+
19+
.PHONY: build release run test clean fmt clippy default
20+
21+
default: build
22+
23+
#-------------------- Core tasks --------------------
24+
25+
build:
26+
$(CARGO) build --profile $(PROFILE)
27+
28+
release:
29+
$(CARGO) build --release
30+
31+
run:
32+
$(CARGO) run --bin zenith-builder-example
33+
34+
test:
35+
$(CARGO) test
36+
37+
clean:
38+
$(CARGO) clean
39+
40+
fmt:
41+
$(CARGO) fmt
42+
43+
clippy:
44+
$(CARGO) clippy $(CLIPPY_FLAGS)
45+
46+
tx-submitter:
47+
$(CARGO) run --bin transaction-submitter

0 commit comments

Comments
 (0)