-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (47 loc) · 1.3 KB
/
Makefile
File metadata and controls
57 lines (47 loc) · 1.3 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
.PHONY: build test clean miner install help
# Default target
help:
@echo "CryptoChain Blockchain - Build Targets"
@echo "====================================="
@echo "build - Build the main application"
@echo "miner - Build the mining CLI"
@echo "test - Run all tests"
@echo "clean - Clean build artifacts"
@echo "install - Install the miner CLI"
@echo "help - Show this help message"
# Build main application
build:
@echo "Building main application..."
go build -o bin/blockchain ./main.go
# Build mining CLI
miner:
@echo "Building mining CLI..."
go build -o bin/miner ./cmd/miner
# Run tests
test:
@echo "Running all tests..."
go test -v ./...
# Clean build artifacts
clean:
@echo "Cleaning build artifacts..."
rm -rf bin/
go clean
# Install miner CLI to system
install: miner
@echo "Installing miner CLI..."
sudo cp bin/miner /usr/local/bin/cryptochain-miner
@echo "✅ Miner CLI installed as 'cryptochain-miner'"
# Development targets
dev-test:
@echo "Running tests with coverage..."
go test -v -cover ./...
dev-lint:
@echo "Running linter..."
golangci-lint run
dev-fmt:
@echo "Formatting code..."
go fmt ./...
# Quick start for development
quick-start: miner
@echo "Starting miner with default settings..."
./bin/miner start -miner dev-user -difficulty 1