forked from analogdevicesinc/cim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (44 loc) · 1.39 KB
/
Makefile
File metadata and controls
53 lines (44 loc) · 1.39 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
# Makefile for Code in Motion (cim) development workflow
# Default target: build, test, lint, format, and install
.PHONY: all build test clippy fmt install clean help
# Default target - runs the complete development workflow
all: build test clippy fmt install
@echo "✓ All tasks completed successfully!"
# Build both binaries in release mode
build:
@echo "Building cim and cim-installer..."
cargo build --release
# Run all tests
test:
@echo "Running tests..."
cargo test --quiet
# Run clippy linter
clippy:
@echo "Running clippy..."
cargo clippy
# Format code
fmt:
@echo "Formatting code..."
cargo fmt
# Install cim CLI to $HOME/bin (depends on build)
install: build
@echo "Installing cim to $$HOME/bin..."
@mkdir -p $$HOME/bin
@cp target/release/cim $$HOME/bin/
@echo "✓ cim installed to $$HOME/bin/cim"
# Clean build artifacts
clean:
@echo "Cleaning build artifacts..."
cargo clean
# Display available targets
help:
@echo "Available targets:"
@echo " make - Run all (build, test, clippy, fmt, install)"
@echo " make all - Same as 'make'"
@echo " make build - Build both binaries in release mode"
@echo " make test - Run all tests"
@echo " make clippy - Run clippy linter"
@echo " make fmt - Format code"
@echo " make install - Install cim CLI to $$HOME/bin"
@echo " make clean - Clean build artifacts"
@echo " make help - Show this help message"