This repository was archived by the owner on Apr 7, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
75 lines (57 loc) · 1.64 KB
/
Copy pathMakefile
File metadata and controls
75 lines (57 loc) · 1.64 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# rippled-zig — XRPL Protocol Toolkit
# Convenience targets wrapping zig build
.PHONY: all build test run bench clean fmt check gates help
# Default: build + test
all: build test
build:
zig build
test:
zig build test
run:
zig build run -- help
bench:
zig build run -- benchmark
fmt:
zig fmt src/ examples/ tools/
check:
zig fmt --check src/ examples/ tools/
clean:
rm -rf .zig-cache zig-out artifacts/
# Quality gates
gates: gate-a gate-b gate-c gate-e
gate-a:
@mkdir -p artifacts/gate-a
bash scripts/gates/gate_a.sh artifacts/gate-a
gate-b:
@mkdir -p artifacts/gate-b
bash scripts/gates/gate_b.sh artifacts/gate-b
gate-c:
@mkdir -p artifacts/gate-c
bash scripts/gates/gate_c.sh artifacts/gate-c
gate-e:
@mkdir -p artifacts/gate-e
bash scripts/gates/gate_e.sh artifacts/gate-e
# WASM targets
wasm:
zig build wasm
# Release builds (all platforms)
release:
zig build release 2>/dev/null || echo "Release step not yet configured — use: zig build -Doptimize=ReleaseSafe"
# Count lines of code
loc:
@echo "Source files:" && ls src/*.zig | wc -l
@echo "Lines of code:" && wc -l src/*.zig | tail -1
@echo "Test count:" && grep -r 'test "' src/*.zig | wc -l
help:
@echo "rippled-zig Makefile targets:"
@echo " all Build + test (default)"
@echo " build Compile the project"
@echo " test Run all tests"
@echo " run Show CLI help"
@echo " bench Run benchmarks"
@echo " fmt Format all source files"
@echo " check Check formatting (CI)"
@echo " clean Remove build artifacts"
@echo " gates Run all quality gates"
@echo " wasm Build WASM targets"
@echo " loc Count lines of code"