-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (34 loc) · 949 Bytes
/
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
MAKEFLAGS += --silent
PROGRAM := holocene_carbon
BUILD_BASE := target/ink
BUILD_DEBUG := build/debug
BUILD_RELEASE := build/release
.PHONY : debug clean check clippy fmt upgrade test all
all: | prepare release
test:
cargo contract test
prepare:
mkdir -p ${BUILD_DEBUG}
mkdir -p ${BUILD_RELEASE}
check:
cargo contract check
clippy:
cargo clippy
upgrade:
cargo update
cargo upgrade
fmt:
cargo fmt
clean:
rm -rf target
rm -rf build
debug: | prepare
cargo contract build
cp ${BUILD_BASE}/${PROGRAM}.wasm ${BUILD_DEBUG}/${PROGRAM}.wasm
cp ${BUILD_BASE}/${PROGRAM}.contract ${BUILD_DEBUG}/${PROGRAM}.contract
cp ${BUILD_BASE}/metadata.json ${BUILD_DEBUG}/metadata.json
release: | prepare
cargo contract build --release
cp ${BUILD_BASE}/${PROGRAM}.wasm ${BUILD_RELEASE}/${PROGRAM}.wasm
cp ${BUILD_BASE}/${PROGRAM}.contract ${BUILD_RELEASE}/${PROGRAM}.contract
cp ${BUILD_BASE}/metadata.json ${BUILD_RELEASE}/metadata.json