summaryrefslogtreecommitdiff
path: root/makima/ios/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makima/ios/Makefile')
-rw-r--r--makima/ios/Makefile54
1 files changed, 54 insertions, 0 deletions
diff --git a/makima/ios/Makefile b/makima/ios/Makefile
new file mode 100644
index 0000000..8d2a23c
--- /dev/null
+++ b/makima/ios/Makefile
@@ -0,0 +1,54 @@
+# Makima iOS — build shortcuts
+# Requires: xcodegen (brew install xcodegen), Xcode 16+
+# Run `make xcgen` after editing project.yml.
+
+SCHEME := Makima
+WORKSPACE := Makima.xcodeproj
+SIM_DEVICE := iPhone 16 Pro
+
+.PHONY: help bootstrap xcgen ios-sim-fast ios-device-fast clean test lint
+
+help:
+ @echo "Targets:"
+ @echo " bootstrap install xcodegen if missing"
+ @echo " xcgen (re)generate Makima.xcodeproj from project.yml"
+ @echo " ios-sim-fast build for simulator ($(SIM_DEVICE))"
+ @echo " ios-device-fast build for generic iOS device"
+ @echo " test run unit tests on simulator"
+ @echo " clean remove generated project + DerivedData"
+ @echo " lint swift format lint (if installed)"
+
+bootstrap:
+ @command -v xcodegen >/dev/null || (echo "Installing xcodegen..." && brew install xcodegen)
+
+xcgen: bootstrap
+ xcodegen generate
+
+ios-sim-fast: xcgen
+ set -o pipefail; xcodebuild \
+ -project $(WORKSPACE) \
+ -scheme $(SCHEME) \
+ -destination 'platform=iOS Simulator,name=$(SIM_DEVICE)' \
+ -configuration Debug \
+ build | xcbeautify || true
+
+ios-device-fast: xcgen
+ set -o pipefail; xcodebuild \
+ -project $(WORKSPACE) \
+ -scheme $(SCHEME) \
+ -destination 'generic/platform=iOS' \
+ -configuration Debug \
+ build | xcbeautify || true
+
+test: xcgen
+ set -o pipefail; xcodebuild \
+ -project $(WORKSPACE) \
+ -scheme $(SCHEME) \
+ -destination 'platform=iOS Simulator,name=$(SIM_DEVICE)' \
+ test | xcbeautify || true
+
+clean:
+ rm -rf Makima.xcodeproj DerivedData build
+
+lint:
+ @command -v swift-format >/dev/null && swift-format lint -r Sources Tests || echo "swift-format not installed, skipping"