-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
68 lines (50 loc) · 2.27 KB
/
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
prog :=tasm-lang
# Treat all warnings as errors
export RUSTFLAGS = -Dwarnings
# Set another target dir than default to avoid builds from `make`
# to invalidate cache from barebones use of `cargo` commands.
# The cache is cleared when a new `RUSTFLAGS` value is encountered,
# so to prevent the two builds from interfering, we use two dirs.
export CARGO_TARGET_DIR=./makefile-target
all: lint format build test bench-no-run
build:
cargo build
rustup check
@echo "Update with \`rustup install stable\` if needed."
doc:
cargo doc --no-deps
xdg-open "target/doc/twenty_first/index.html"
check:
cargo check
ctags:
# Do `cargo install rusty-tags`
# See https://github.com/dan-t/rusty-tags
rusty-tags vi
format:
cargo fmt --all -- --check
install:
cp target/$(target)/$(prog) ~/bin/$(prog)$(extension)
lint:
cargo clippy --all-targets -- -D warnings
# Get a stack trace upon kernel panic (may slow down implementation)
test: export RUST_BACKTRACE = 1
test:
cargo test
fast-tests:
RUSTFLAGS="-C opt-level=3 -C debug-assertions=no" cargo t
bench:
cargo bench
bench-no-run:
cargo bench --no-run
# Run prove/verify on `verify_factorial_program`. Meant to measure recursive proof generation.
prove-recursive:
RUSTFLAGS="-C opt-level=3 -C debug-assertions=no" DYING_TO_PROVE=1 PROFILE_AS_YOU_GO=1 cargo t recursive_proof_verification -- --test-threads=1 --nocapture --ignored
help:
@echo "usage: make [debug=1]"
clean:
@echo " ._. ██ ██ ███ ██ ██ █████ ████ ██ █████ ███ ██ ██"
@echo " c/-| ███ ███ ██ ██ ████ ██ ██ ██ ██ ██ ██ ███ ██"
@echo " c/--| ████████ █████ ███ ███ ██ ██ ███ █████ ██████"
@echo " / /| ██ ██ ██ ██ ██ ████ ██ ██ ██ ██ ██ ██ ██ ███"
@echo " mmm ' ' ██ ██ ██ ██ ██ ██ █████ ████ █████ █████ ██ ██ ██ ██"
@rm -rf target