-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
58 lines (49 loc) · 1.52 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
build:
cargo build --release
cargo build --release --target thumbv7em-none-eabi
clean:
cargo clean
make -C c-api clean
test:
# Test on PC
cargo test
# Test on QEMU
make -C qemu-tests test
# Test C API
make -C c-api test
fmt:
cargo fmt --all
fix: fmt
cargo clippy --fix --workspace --allow-staged
# used in CI
check:
# cargo check --all
cargo check -p salty
cargo check -p salty-c-api --target thumbv7em-none-eabi
cargo check -p qemu-tests
cargo check -p wycheproof-macros
cargo check -p wycheproof-parser
cargo check -p wycheproof-types
# used in CI
lint:
cargo fmt --check --all
# cargo clippy --workspace
cargo clippy -p salty
cargo clippy -p salty-c-api --target thumbv7em-none-eabi
cargo clippy -p qemu-tests
cargo clippy -p wycheproof-macros
cargo clippy -p wycheproof-parser
cargo clippy -p wycheproof-types
local-docs:
cargo doc --document-private-items
rustup-targets:
rustup target add thumbv7em-none-eabi
rustup target add thumbv8m.main-none-eabi
WP_VECTOR_SOURCE = https://raw.githubusercontent.com/google/wycheproof/master/testvectors
WP_SCHEMA_SOURCE = https://raw.githubusercontent.com/google/wycheproof/master/schemas
WP_DATA = wycheproof/data
update-wycheproof-data:
curl -sSf $(WP_VECTOR_SOURCE)/eddsa_test.json -o $(WP_DATA)/eddsa_test.json
curl -sSf $(WP_SCHEMA_SOURCE)/eddsa_verify_schema.json -o $(WP_DATA)/eddsa_verify_schema.json
curl -sSf $(WP_VECTOR_SOURCE)/x25519_test.json -o $(WP_DATA)/x25519_test.json
curl -sSf $(WP_SCHEMA_SOURCE)/xdh_comp_schema.json -o $(WP_DATA)/xdh_comp_schema.json