forked from Trustlink-1/TrustLink
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (33 loc) · 1.14 KB
/
Copy pathMakefile
File metadata and controls
41 lines (33 loc) · 1.14 KB
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
.PHONY: build test optimize clean install help
help:
@echo "TrustLink Smart Contract - Makefile Commands"
@echo "============================================="
@echo "make build - Build the contract in debug mode"
@echo "make test - Run all unit tests"
@echo "make optimize - Build optimized release version"
@echo "make clean - Clean build artifacts"
@echo "make install - Install required dependencies"
install:
@echo "Installing Rust and Soroban CLI..."
@echo "Please ensure you have Rust installed: https://rustup.rs/"
@echo "Install Soroban CLI: cargo install --locked soroban-cli"
build:
@echo "Building TrustLink contract..."
cargo build --target wasm32-unknown-unknown --release
test:
@echo "Running tests..."
cargo test
optimize:
@echo "Building optimized contract..."
cargo build --target wasm32-unknown-unknown --release
@echo "Optimizing WASM..."
soroban contract optimize --wasm target/wasm32-unknown-unknown/release/trustlink.wasm
clean:
@echo "Cleaning build artifacts..."
cargo clean
fmt:
@echo "Formatting code..."
cargo fmt
clippy:
@echo "Running clippy..."
cargo clippy --all-targets -- -D warnings