27 lines
935 B
Makefile
27 lines
935 B
Makefile
.PHONY: build run install test
|
|
|
|
APP := .build/Conjure.app
|
|
INSTALL_DIR ?= /Applications
|
|
CODE_SIGN_IDENTITY ?= -
|
|
# Keep AppKit on the current SDK appearance, not deployment-target compatibility styling.
|
|
PLATFORM_FLAGS := -Xlinker -platform_version -Xlinker macos -Xlinker 14.0 -Xlinker $(shell xcrun --show-sdk-version)
|
|
|
|
build:
|
|
swift build -c release $(PLATFORM_FLAGS)
|
|
mkdir -p $(APP)/Contents/MacOS $(APP)/Contents/Resources
|
|
cp .build/release/Conjure $(APP)/Contents/MacOS/Conjure
|
|
cp Resources/Info.plist $(APP)/Contents/Info.plist
|
|
cp -R .build/release/*.bundle $(APP)/Contents/Resources/
|
|
swift Scripts/icon.swift .build/Conjure.iconset
|
|
iconutil -c icns .build/Conjure.iconset -o $(APP)/Contents/Resources/Conjure.icns
|
|
codesign --force --sign "$(CODE_SIGN_IDENTITY)" $(APP)
|
|
|
|
run: build
|
|
swift Scripts/run.swift "$(APP)"
|
|
|
|
install: build
|
|
swift Scripts/install.swift "$(APP)" "$(INSTALL_DIR)"
|
|
|
|
test:
|
|
swift test $(PLATFORM_FLAGS)
|