-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
115 lines (92 loc) · 2.57 KB
/
Makefile
File metadata and controls
115 lines (92 loc) · 2.57 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# =========================================================
# ssh-forge Makefile
# =========================================================
.DEFAULT_GOAL := help
APP=ssh-forge-dev
BUILD_SCRIPT=./build-install
DEPS_SCRIPT=./build/build-deps
.PHONY: help deps deps-cli deps-gui deps-build deps-all \
build cli install uninstall clean rebuild dry-run
# ---------------------------------------------------------
# NOTE:
# install target requires prebuilt binary:
# ./ssh-forge-dev
#
# Build first:
# make build
# ---------------------------------------------------------
# ---------------- Help ----------------
help:
@echo ""
@echo "ssh-forge Build System"
@echo ""
@echo "Targets:"
@echo ""
@echo "Dependency setup:"
@echo " make deps Install core dependencies"
@echo " make deps-cli Install minimal CLI dependencies"
@echo " make deps-gui Install GUI dependencies"
@echo " make deps-build Install build tools"
@echo " make deps-all Install everything (core + gui + build)"
@echo ""
@echo "Build:"
@echo " make build Build CLI + GUI"
@echo " make cli Build CLI only"
@echo " make dry-run Simulate build"
@echo ""
@echo "Install:"
@echo " make install Install binaries (requires prebuilt ssh-forge-dev)"
@echo " make uninstall Remove installation"
@echo ""
@echo "Maintenance:"
@echo " make clean Remove built artifacts"
@echo " make rebuild Clean + Build"
@echo ""
# ---------------- Dependencies ----------------
deps:
@echo "Installing core dependencies..."
$(DEPS_SCRIPT)
deps-cli:
@echo "Installing CLI dependencies..."
$(DEPS_SCRIPT) --cli
deps-gui:
@echo "Installing GUI dependencies..."
$(DEPS_SCRIPT) --gui
deps-build:
@echo "Installing build tools..."
$(DEPS_SCRIPT) --build
deps-all:
@echo "Installing ALL dependencies..."
$(DEPS_SCRIPT) --gui --build -y
# ---------------- Build ----------------
build:
$(BUILD_SCRIPT)
cli:
$(BUILD_SCRIPT) --cli
dry-run:
$(BUILD_SCRIPT) --dry-run
# ---------------- Install ----------------
install:
@if [ ! -f "./$(APP)" ]; then \
echo "❌ $(APP) binary not found."; \
echo "Run 'make build' first."; \
exit 1; \
fi
./$(APP) install
uninstall:
./$(APP) uninstall
# ---------------- Clean ----------------
clean:
@echo "Cleaning build artifacts..."
rm -f bin/ssh-forge \
bin/sf-key \
bin/scpx \
bin/sf-git-auth \
bin/sf-cpy \
bin/sf-reset \
ssh-forge-dev \
gui/ssh-forge-gui
rm -rf gui/_internal
@echo "✔ Clean complete"
# ---------------- Rebuild ----------------
rebuild: clean build