-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (38 loc) · 1.17 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
COMPILER_VERSION=v0.2.0
all: contract
test: contract test-contract
@cargo test --release --manifest-path=tests/Cargo.toml
contract: setup-compiler
@RUSTFLAGS="-C link-args=-zstack-size=65536" \
cargo +dusk build \
--release \
--manifest-path=contract/Cargo.toml \
--color=always \
-Z build-std=core,alloc \
--target wasm64-unknown-unknown
@mkdir -p build
@find target/wasm64-unknown-unknown/release -maxdepth 1 -name "*.wasm" \
| xargs -I % basename % \
| xargs -I % ./scripts/strip.sh \
target/wasm64-unknown-unknown/release/% \
build/%
test-contract: setup-compiler
@RUSTFLAGS="-C link-args=-zstack-size=65536" \
cargo +dusk build \
--release \
--manifest-path=tests/contract/Cargo.toml \
--color=always \
-Z build-std=core,alloc \
--target wasm64-unknown-unknown
@mkdir -p build
@find target/wasm64-unknown-unknown/release -maxdepth 1 -name "*.wasm" \
| xargs -I % basename % \
| xargs -I % ./scripts/strip.sh \
target/wasm64-unknown-unknown/release/% \
build/%
setup-compiler:
@./scripts/setup-compiler.sh $(COMPILER_VERSION)
clean:
@cargo clean
@rm -rf build
.PHONY: all test contract test-contract clean setup-compiler