blob: 9f068164a98bd0f82707bf1806266f9c6c80e165 (
plain) (
blame)
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
|
default: debug release
debug:
$(MAKE) all
release:
$(MAKE) all CARGO_FLAGS=--release
all: build build-examples check-fmt check-clippy check-tests check-examples check-readme run-examples
build:
cargo build $(CARGO_FLAGS)
build-examples:
cargo build $(CARGO_FLAGS) --examples
check-fmt:
cargo fmt --check
check-clippy:
cargo clippy -- -Dwarnings -Aclippy::new_without_default
check-tests:
cargo test $(CARGO_FLAGS)
check-examples:
cargo test $(CARGO_FLAGS) --examples
check-readme:
awk '/^```rust$$/,/^```$$/ { if (!($$1 ~ "^```")) { print } }' ../README.md > ../examples/readme.rs
cargo run $(CARGO_FLAGS) --example readme
rm -f ../examples/readme.rs
run-examples:
cargo run $(CARGO_FLAGS) --example fib
cargo run $(CARGO_FLAGS) --example add
cargo run $(CARGO_FLAGS) --example tiny_vm
cargo run $(CARGO_FLAGS) --example tiny_vm jit
cargo run $(CARGO_FLAGS) --example bf
|