-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·77 lines (65 loc) · 2.38 KB
/
Makefile
File metadata and controls
executable file
·77 lines (65 loc) · 2.38 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
.PHONY: build app install clean run help
help: ## Show this help message
@echo "EllProxy - macOS Menu Bar App"
@echo ""
@echo "Available targets:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'
build: ## Build the Swift executable (debug)
@echo "🔨 Building Swift executable..."
@cd src && swift build
@echo "✅ Build complete: src/.build/debug/CLIProxyMenuBar"
release: ## Build the Swift executable (release)
@echo "🔨 Building Swift executable (release)..."
@./build.sh
@echo "✅ Build complete: src/.build/release/CLIProxyMenuBar"
app: ## Create the .app bundle
@echo "📦 Creating .app bundle..."
@echo "📄 Ensuring config.yaml is in Resources..."
@cp -f src/Sources/config.yaml src/Sources/Resources/config.yaml
@./create-app-bundle.sh
@echo "✅ App bundle created: EllProxy.app"
install: app ## Build and install to /Applications
@echo "📲 Installing to /Applications..."
@rm -rf "/Applications/EllProxy.app"
@cp -r "EllProxy.app" /Applications/
@echo "✅ Installed to /Applications/EllProxy.app"
run: app ## Build and run the app
@echo "🚀 Launching app..."
@open "EllProxy.app"
clean: ## Clean build artifacts
@echo "🧹 Cleaning..."
@rm -rf src/.build
@rm -rf "EllProxy.app"
@rm -rf src/Sources/Resources/cli-proxy-api
@rm -rf src/Sources/Resources/config.yaml
@rm -rf src/Sources/Resources/static
@echo "✅ Clean complete"
test: ## Run a quick test build
@echo "🧪 Testing build..."
@cd src && swift build
@echo "✅ Test build successful"
info: ## Show project information
@echo "Project: EllProxy - macOS Menu Bar App"
@echo "Language: Swift 5.9+"
@echo "Platform: macOS 13.0+"
@echo ""
@echo "Files:"
@find src/Sources -name "*.swift" -exec wc -l {} + | tail -1 | awk '{print " Swift code: " $$1 " lines"}'
@echo " Documentation: 4 files"
@echo ""
@echo "Structure:"
@tree -L 3 -I ".build" || echo " (install 'tree' for better output)"
open: ## Open app bundle to inspect contents
@if [ -d "EllProxy.app" ]; then \
open "EllProxy.app"; \
else \
echo "❌ App bundle not found. Run 'make app' first."; \
fi
edit-config: ## Edit the bundled config.yaml
@if [ -d "EllProxy.app" ]; then \
open -e "EllProxy.app/Contents/Resources/config.yaml"; \
else \
echo "❌ App bundle not found. Run 'make app' first."; \
fi
# Shortcuts
all: app ## Same as 'app'