-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (48 loc) · 1.47 KB
/
Makefile
File metadata and controls
56 lines (48 loc) · 1.47 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
.PHONY: all build test install clean rust-lib uninstall help
# Default target: build everything
all: build
# Build both Rust library and Go binary
build: rust-lib
@echo "Building Go binary..."
go build
# Build the Rust library
rust-lib:
@echo "Building Rust library..."
cd rust && cargo build --release
# Run tests for both Go and Rust
test: rust-lib
@echo "Running Go tests..."
go test ./...
@echo "Running Rust tests..."
cd rust && cargo test --release
# Install the Go binary (statically linked, no external library needed)
install: rust-lib
@echo "Installing Go binary..."
go install .
@echo ""
@echo "✅ Installation complete!"
# Clean build artifacts
clean:
@echo "Cleaning Go build cache..."
go clean
@echo "Cleaning Rust build artifacts..."
cd rust && cargo clean
@echo "✅ Clean complete!"
# Uninstall the Go binary
uninstall:
@echo "Uninstalling Go binary..."
go clean -i
@echo "✅ Uninstall complete!"
# Show help
help:
@echo "Beefdown Build System"
@echo ""
@echo "Targets:"
@echo " make - Build everything (Rust static library + Go binary)"
@echo " make build - Same as default"
@echo " make rust-lib - Build only the Rust static library"
@echo " make test - Run all tests (Go + Rust)"
@echo " make install - Install self-contained Go binary to GOPATH"
@echo " make uninstall - Remove installed binary"
@echo " make clean - Clean all build artifacts"
@echo " make help - Show this help"