-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
74 lines (62 loc) · 1.92 KB
/
Makefile
File metadata and controls
74 lines (62 loc) · 1.92 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
.PHONY: build release run install uninstall clean test help
BINARY_NAME = xcode-theme-generator
BUILD_DIR = .build
RELEASE_DIR = $(BUILD_DIR)/release
DEBUG_DIR = $(BUILD_DIR)/debug
INSTALL_DIR = /usr/local/bin
# Default target
all: build
# Build debug version
build:
swift build
# Build release version (optimized)
release:
swift build -c release
# Run interactive wizard
run: build
swift run $(BINARY_NAME)
# Run with quick mode (skip adjuster)
run-quick: build
swift run $(BINARY_NAME) --quick
# List existing themes
list: build
swift run $(BINARY_NAME) list
# Install to /usr/local/bin (requires sudo)
install: release
@echo "Installing $(BINARY_NAME) to $(INSTALL_DIR)..."
sudo cp $(RELEASE_DIR)/$(BINARY_NAME) $(INSTALL_DIR)/$(BINARY_NAME)
@echo "Installed! Run '$(BINARY_NAME)' from anywhere."
# Uninstall from /usr/local/bin
uninstall:
@echo "Removing $(BINARY_NAME) from $(INSTALL_DIR)..."
sudo rm -f $(INSTALL_DIR)/$(BINARY_NAME)
@echo "Uninstalled."
# Clean build artifacts
clean:
swift package clean
rm -rf $(BUILD_DIR)
rm -f *.xccolortheme
# Generate a test theme (non-interactive)
test-generate: build
swift run $(BINARY_NAME) generate \
--color "#6366f1" \
--dark \
--vibe vibrant \
--name "Test Theme" \
--no-install
@echo ""
@echo "Generated: test-theme.xccolortheme"
# Show help
help:
@echo "Xcode Theme Generator - Makefile targets"
@echo ""
@echo " make build Build debug version"
@echo " make release Build optimized release version"
@echo " make run Run interactive wizard"
@echo " make run-quick Run wizard (skip color adjuster)"
@echo " make list List existing Xcode themes"
@echo " make install Install to $(INSTALL_DIR) (needs sudo)"
@echo " make uninstall Remove from $(INSTALL_DIR)"
@echo " make clean Remove build artifacts"
@echo " make test-generate Generate a test theme file"
@echo " make help Show this help"