-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·76 lines (56 loc) · 3.67 KB
/
Makefile
File metadata and controls
executable file
·76 lines (56 loc) · 3.67 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
# ─── cloud-forge Makefile ───────────────────────────────────────────────────
SHELL := /usr/bin/env bash
PROJECT_ROOT := $(shell cd "$(dir $(abspath $(lastword $(MAKEFILE_LIST))))" && pwd)
BUILD_DIR := $(PROJECT_ROOT)/build
INSTALL_SH := $(PROJECT_ROOT)/install.sh
.PHONY: all build build-cli build-gui deps install install-only install-cli uninstall clean help
# ─── Default ────────────────────────────────────────────────────────────────
all: help
# ─── Dependencies ───────────────────────────────────────────────────────────
## deps Install GUI system dependencies (requires sudo)
deps:
@sudo bash "$(BUILD_DIR)/install-deps-gui.sh"
# ─── Build ──────────────────────────────────────────────────────────────────
## build Build all binaries (rclone-sftp + rclone-engine + cloud-forge)
build:
@bash "$(INSTALL_SH)" --build
## build-cli Build CLI binaries only (rclone-sftp + rclone-engine)
build-cli:
@bash "$(INSTALL_SH)" --build --cli
## build-gui Build GUI binary only (cloud-forge)
build-gui:
@bash "$(BUILD_DIR)/build-gui.sh"
# ─── Install ────────────────────────────────────────────────────────────────
## install Build everything, then install (symlinks + desktop entry)
install:
@bash "$(INSTALL_SH)" --build --install
## install-only Install pre-built binaries only (symlinks + desktop entry, no build)
install-only:
@bash "$(INSTALL_SH)" --install
## install-cli Build CLI only, then install symlinks (no desktop entry)
install-cli:
@bash "$(INSTALL_SH)" --build --install --cli
# ─── Uninstall ──────────────────────────────────────────────────────────────
## uninstall Remove symlinks and desktop entry
uninstall:
@bash "$(INSTALL_SH)" --remove
# ─── Clean ──────────────────────────────────────────────────────────────────
## clean Remove all build outputs (binaries + build artefacts)
clean:
@echo " [INFO] Cleaning build outputs..."
@rm -f "$(PROJECT_ROOT)/cloud-forge"
@rm -f "$(PROJECT_ROOT)/rclone-engine"
@rm -f "$(PROJECT_ROOT)/bin/rclone-sftp"
@rm -rf "$(BUILD_DIR)/.pyinstaller"
@rm -rf "$(BUILD_DIR)/.venv-build"
@echo " [OK] Clean done."
# ─── Help ───────────────────────────────────────────────────────────────────
## help Show this help message
help:
@echo ""
@echo " ╔══════════════════════════════════════╗"
@echo " ║ cloud-forge Makefile ║"
@echo " ╚══════════════════════════════════════╝"
@echo ""
@grep -E '^##' $(MAKEFILE_LIST) | sed 's/^## / make /' | column -t -s '@'
@echo ""