-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (59 loc) · 2.02 KB
/
Makefile
File metadata and controls
68 lines (59 loc) · 2.02 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
# OpenVision Makefile
.PHONY: setup generate clean open help
# Default target
help:
@echo "OpenVision Build Commands:"
@echo ""
@echo " make setup - Install dependencies and generate Xcode project"
@echo " make generate - Generate Xcode project from project.yml"
@echo " make open - Open project in Xcode"
@echo " make clean - Remove generated files"
@echo ""
@echo "First time setup:"
@echo " 1. Edit Config.xcconfig with your Team ID and Meta App ID"
@echo " 2. Run: make setup"
@echo " 3. Run: make open"
# Install xcodegen if needed and generate project
setup: check-config
@echo "Checking for xcodegen..."
@which xcodegen > /dev/null || (echo "Installing xcodegen..." && brew install xcodegen)
@echo "Generating Xcode project..."
@xcodegen generate
@echo ""
@echo "✅ Project generated! Run 'make open' to open in Xcode"
# Generate Xcode project
generate: check-config
@xcodegen generate
@echo "✅ Project generated!"
# Check that config files exist
check-config:
@if [ ! -f "Config.xcconfig" ]; then \
echo "❌ Error: Config.xcconfig not found"; \
echo "Please copy Config.xcconfig.example to Config.xcconfig and fill in your values"; \
exit 1; \
fi
@if grep -q "XXXXXXXXXX" Config.xcconfig; then \
echo "⚠️ Warning: Config.xcconfig still has placeholder values"; \
echo "Please edit Config.xcconfig with your Development Team ID and Meta App ID"; \
fi
# Open in Xcode
open:
@if [ -d "OpenVision.xcodeproj" ]; then \
open OpenVision.xcodeproj; \
else \
echo "❌ Project not found. Run 'make setup' first."; \
fi
# Clean generated files
clean:
@rm -rf OpenVision.xcodeproj
@rm -rf .build
@rm -rf DerivedData
@echo "✅ Cleaned!"
# Format code (requires swiftformat)
format:
@which swiftformat > /dev/null || (echo "Installing swiftformat..." && brew install swiftformat)
@swiftformat OpenVision --indent 4 --swiftversion 5.9
# Lint code (requires swiftlint)
lint:
@which swiftlint > /dev/null || (echo "Installing swiftlint..." && brew install swiftlint)
@swiftlint OpenVision