# # Makefile # Zyquo Local # # Author: Simon-Pierre Boucher # Mail: contact@spboucher.ai # # ── Build environment (see docs/BUILD.md) ──────────────────────────────────── # 1. SDK pin: macOS 27 CLT SDKs ship SwiftUI @State/@Bindable as Xcode-only # macro plugins; 26.5 is the last SDK where plain `swift build` works. # 2. Metal: mlx-swift compiles .metal kernels at build time; the compiler is # resolved via PATH from the standalone Metal toolchain. export SDKROOT := /Library/Developer/CommandLineTools/SDKs/MacOSX26.5.sdk export PATH := $(HOME)/Developer/Metal.xctoolchain/usr/bin:$(PATH) APP_NAME := Zyquo Local EXEC_NAME := ZyquoLocal BUNDLE_ID := com.zyquo.local VERSION := 1.0.0 BUILD_DIR := .build DIST_DIR := dist APP_BUNDLE := $(DIST_DIR)/$(APP_NAME).app RELEASE_BIN := $(BUILD_DIR)/release/$(EXEC_NAME) DEBUG_BIN := $(BUILD_DIR)/debug/$(EXEC_NAME) SIGN_IDENTITY := Developer ID Application: Simon-Pierre Boucher (3YM54G49SN) NOTARY_PROFILE := MacLustr-Notarize .PHONY: build release-build test clean dev bundle-debug bundle-release icon run poc release headers-check build: swift build release-build: swift build -c release test: swift test clean: swift package clean rm -rf $(DIST_DIR) # ── App bundle assembly ────────────────────────────────────────────────────── # $(1) = built products dir (.build/debug or .build/release) define assemble_bundle rm -rf "$(APP_BUNDLE)" mkdir -p "$(APP_BUNDLE)/Contents/MacOS" "$(APP_BUNDLE)/Contents/Resources" cp "$(1)/$(EXEC_NAME)" "$(APP_BUNDLE)/Contents/MacOS/$(EXEC_NAME)" cp Support/Info.plist "$(APP_BUNDLE)/Contents/Info.plist" printf 'APPL????' > "$(APP_BUNDLE)/Contents/PkgInfo" @# MLX metallib + any other SPM resource bundles must ship in Resources for b in "$(1)"/*.bundle; do \ [ -e "$$b" ] && cp -R "$$b" "$(APP_BUNDLE)/Contents/Resources/" || true; \ done [ -f assets/icon/AppIcon.icns ] && cp assets/icon/AppIcon.icns "$(APP_BUNDLE)/Contents/Resources/AppIcon.icns" || true [ -d assets/icon/menubar ] && cp assets/icon/menubar/MenuBarIcon*.png "$(APP_BUNDLE)/Contents/Resources/" || true endef bundle-debug: build $(call assemble_bundle,$(BUILD_DIR)/debug) codesign --force --deep --sign - "$(APP_BUNDLE)" bundle-release: release-build $(call assemble_bundle,$(BUILD_DIR)/release) # Debug bundle, ad-hoc signed, launched. dev: bundle-debug open "$(APP_BUNDLE)" run: dev # Inference proof-of-concept: make poc MODEL= PROMPT="..." poc: build "$(DEBUG_BIN)" --poc "$(MODEL)" "$(PROMPT)" # Icon pipeline (Phase 5): SVG → PNGs → icns via scripts/make-icon.sh icon: scripts/make-icon.sh # Signed, notarized, stapled release (Phase 8): scripts/release.sh release: scripts/release.sh headers-check: scripts/check-headers.sh