-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (42 loc) · 1.16 KB
/
Copy pathMakefile
File metadata and controls
52 lines (42 loc) · 1.16 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
# Simple Makefile for Google Cloud SSH Manager
# Created by Hamze Ghalebi, CTO at Welcome Place
# Part of a collection of open-source developer tools
# Configuration
BINARY = gcloud-ssh
INSTALL_DIR = $(HOME)/.local/bin
# Default: build in debug mode
all: build
# Build the application (debug mode)
build:
cargo build
# Build optimized release
release:
cargo build --release
# Run the application
run:
cargo run
# Install (user level)
install: release
mkdir -p $(INSTALL_DIR)
cp target/release/hcloud $(INSTALL_DIR)/$(BINARY)
chmod +x $(INSTALL_DIR)/$(BINARY)
@echo "Installed to $(INSTALL_DIR)/$(BINARY)"
@echo "Make sure $(INSTALL_DIR) is in your PATH"
# Run tests
test:
cargo test
# Clean build artifacts
clean:
cargo clean
# Show help
help:
@echo "Simple Makefile for Google Cloud SSH Manager"
@echo ""
@echo "make - Build in debug mode"
@echo "make release - Build optimized release"
@echo "make run - Run the application"
@echo "make install - Install to ~/.local/bin"
@echo "make test - Run tests"
@echo "make clean - Clean build artifacts"
@echo "make help - Show this help"
.PHONY: all build release run install test clean help