
Some checks are pending
iOS UniFFI Build / build-ios (push) Waiting to run
Add church management API library with cross-platform support for iOS, Android, and WASM. Features include event management, bulletin handling, contact forms, and authentication.
69 lines
2.2 KiB
Makefile
69 lines
2.2 KiB
Makefile
# UniFFI iOS Build Makefile
|
|
# No Python dependencies required
|
|
|
|
.PHONY: all clean ios android wasm help install-deps
|
|
|
|
# Default target
|
|
all: ios
|
|
|
|
# Build iOS framework with UniFFI bindings
|
|
ios:
|
|
@echo "🚀 Building iOS framework..."
|
|
@./build_ios.sh
|
|
|
|
# Clean all build artifacts
|
|
clean:
|
|
@echo "🧹 Cleaning build artifacts..."
|
|
@rm -rf target/
|
|
@rm -rf bindings/
|
|
@rm -rf libchurch_core_universal.a
|
|
|
|
# Install required dependencies
|
|
install-deps:
|
|
@echo "📦 Installing build dependencies..."
|
|
@rustup target add aarch64-apple-ios
|
|
@rustup target add x86_64-apple-ios
|
|
@rustup target add aarch64-apple-ios-sim
|
|
@cargo install uniffi_bindgen --bin uniffi-bindgen
|
|
|
|
# Test the Rust library
|
|
test:
|
|
@echo "🧪 Running tests..."
|
|
@cargo test --features uniffi
|
|
|
|
# Build for development (faster, debug mode)
|
|
dev:
|
|
@echo "🔧 Building development version..."
|
|
@cargo build --features uniffi
|
|
|
|
# Generate only Swift bindings (no rebuild)
|
|
bindings-only:
|
|
@echo "⚡ Generating Swift bindings only..."
|
|
@mkdir -p bindings/ios
|
|
@uniffi-bindgen generate \
|
|
--library target/aarch64-apple-ios/release/libchurch_core.a \
|
|
--language swift \
|
|
--out-dir bindings/ios \
|
|
src/church_core.udl
|
|
@echo "📋 Creating module map..."
|
|
@echo 'module church_coreFFI {\n header "church_coreFFI.h"\n export *\n}' > bindings/ios/church_coreFFI.modulemap
|
|
|
|
# Copy generated files to iOS project
|
|
copy-to-ios:
|
|
@echo "📦 Copying files to iOS project..."
|
|
@cp bindings/ios/church_core.swift ../RTSDA-iOS/RTSDA/
|
|
@cp bindings/ios/church_coreFFI.h ../RTSDA-iOS/RTSDA/
|
|
@cp bindings/ios/church_coreFFI.modulemap ../RTSDA-iOS/RTSDA/
|
|
@cp bindings/ios/libchurch_core_universal.a ../RTSDA-iOS/RTSDA/libchurch_core.a
|
|
|
|
# Help
|
|
help:
|
|
@echo "📚 Available commands:"
|
|
@echo " make ios - Build complete iOS framework (default)"
|
|
@echo " make clean - Clean all build artifacts"
|
|
@echo " make install-deps - Install required build dependencies"
|
|
@echo " make test - Run Rust tests"
|
|
@echo " make dev - Quick development build"
|
|
@echo " make bindings-only - Generate Swift bindings only"
|
|
@echo " make copy-to-ios - Copy generated files to iOS project"
|
|
@echo " make help - Show this help message"
|