SPB Git

spb/zyquo-local Public MIT

Native macOS AI chat that runs LLMs 100% locally on Apple Silicon with MLX — no cloud, no API keys.

Swift 97.2% Shell 1.8% Makefile 1%
2.9 KB · 87 lines make
Raw Blame History
1#2#  Makefile3#  Zyquo Local4#5#  Author: Simon-Pierre Boucher6#  Mail: contact@spboucher.ai7#89# ── Build environment (see docs/BUILD.md) ────────────────────────────────────10# 1. SDK pin: macOS 27 CLT SDKs ship SwiftUI @State/@Bindable as Xcode-only11#    macro plugins; 26.5 is the last SDK where plain `swift build` works.12# 2. Metal: mlx-swift compiles .metal kernels at build time; the compiler is13#    resolved via PATH from the standalone Metal toolchain.14export SDKROOT := /Library/Developer/CommandLineTools/SDKs/MacOSX26.5.sdk15export PATH    := $(HOME)/Developer/Metal.xctoolchain/usr/bin:$(PATH)1617APP_NAME      := Zyquo Local18EXEC_NAME     := ZyquoLocal19BUNDLE_ID     := com.zyquo.local20VERSION       := 1.0.021BUILD_DIR     := .build22DIST_DIR      := dist23APP_BUNDLE    := $(DIST_DIR)/$(APP_NAME).app24RELEASE_BIN   := $(BUILD_DIR)/release/$(EXEC_NAME)25DEBUG_BIN     := $(BUILD_DIR)/debug/$(EXEC_NAME)26SIGN_IDENTITY := Developer ID Application: Simon-Pierre Boucher (3YM54G49SN)27NOTARY_PROFILE := MacLustr-Notarize2829.PHONY: build release-build test clean dev bundle-debug bundle-release icon run poc release headers-check3031build:32	swift build3334release-build:35	swift build -c release3637test:38	swift test3940clean:41	swift package clean42	rm -rf $(DIST_DIR)4344# ── App bundle assembly ──────────────────────────────────────────────────────45# $(1) = built products dir (.build/debug or .build/release)46define assemble_bundle47	rm -rf "$(APP_BUNDLE)"48	mkdir -p "$(APP_BUNDLE)/Contents/MacOS" "$(APP_BUNDLE)/Contents/Resources"49	cp "$(1)/$(EXEC_NAME)" "$(APP_BUNDLE)/Contents/MacOS/$(EXEC_NAME)"50	cp Support/Info.plist "$(APP_BUNDLE)/Contents/Info.plist"51	printf 'APPL????' > "$(APP_BUNDLE)/Contents/PkgInfo"52	@# MLX metallib + any other SPM resource bundles must ship in Resources53	for b in "$(1)"/*.bundle; do \54		[ -e "$$b" ] && cp -R "$$b" "$(APP_BUNDLE)/Contents/Resources/" || true; \55	done56	[ -f assets/icon/AppIcon.icns ] && cp assets/icon/AppIcon.icns "$(APP_BUNDLE)/Contents/Resources/AppIcon.icns" || true57	[ -d assets/icon/menubar ] && cp assets/icon/menubar/MenuBarIcon*.png "$(APP_BUNDLE)/Contents/Resources/" || true58endef5960bundle-debug: build61	$(call assemble_bundle,$(BUILD_DIR)/debug)62	codesign --force --deep --sign - "$(APP_BUNDLE)"6364bundle-release: release-build65	$(call assemble_bundle,$(BUILD_DIR)/release)6667# Debug bundle, ad-hoc signed, launched.68dev: bundle-debug69	open "$(APP_BUNDLE)"7071run: dev7273# Inference proof-of-concept: make poc MODEL=<dir> PROMPT="..."74poc: build75	"$(DEBUG_BIN)" --poc "$(MODEL)" "$(PROMPT)"7677# Icon pipeline (Phase 5): SVG → PNGs → icns via scripts/make-icon.sh78icon:79	scripts/make-icon.sh8081# Signed, notarized, stapled release (Phase 8): scripts/release.sh82release:83	scripts/release.sh8485headers-check:86	scripts/check-headers.sh87