-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (26 loc) · 821 Bytes
/
Makefile
File metadata and controls
32 lines (26 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
APP_NAME = Frost
BUILD_DIR = .build
RELEASE_BIN = $(BUILD_DIR)/release/$(APP_NAME)
APP_BUNDLE = $(BUILD_DIR)/$(APP_NAME).app
.PHONY: build run clean install
build:
swift build -c release
@mkdir -p "$(APP_BUNDLE)/Contents/MacOS"
@mkdir -p "$(APP_BUNDLE)/Contents/Resources"
@cp $(RELEASE_BIN) "$(APP_BUNDLE)/Contents/MacOS/"
@cp Frost/Resources/Info.plist "$(APP_BUNDLE)/Contents/"
@echo "✅ $(APP_BUNDLE)"
run: build
@open "$(APP_BUNDLE)"
debug:
swift build
@mkdir -p "$(APP_BUNDLE)/Contents/MacOS"
@cp .build/debug/$(APP_NAME) "$(APP_BUNDLE)/Contents/MacOS/"
@cp Frost/Resources/Info.plist "$(APP_BUNDLE)/Contents/"
@open "$(APP_BUNDLE)"
clean:
swift package clean
@rm -rf "$(APP_BUNDLE)"
install: build
@cp -R "$(APP_BUNDLE)" /Applications/
@echo "✅ Installed to /Applications/$(APP_NAME).app"