-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (31 loc) · 874 Bytes
/
Copy pathMakefile
File metadata and controls
40 lines (31 loc) · 874 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
33
34
35
36
37
38
39
40
APP_NAME = Proggy
BUILD_DIR = .build
APP_BUNDLE = $(BUILD_DIR)/$(APP_NAME).app
CONTENTS = $(APP_BUNDLE)/Contents
MACOS = $(CONTENTS)/MacOS
RESOURCES = $(CONTENTS)/Resources
.PHONY: all build bundle run clean
all: bundle
build:
swift build -c release
debug:
swift build
bundle: build
@mkdir -p $(MACOS) $(RESOURCES)
@cp $(BUILD_DIR)/release/$(APP_NAME) $(MACOS)/$(APP_NAME)
@cp Resources/Info.plist $(CONTENTS)/Info.plist
@codesign --force --sign - $(APP_BUNDLE)
@echo "Built $(APP_BUNDLE)"
bundle-debug: debug
@mkdir -p $(MACOS) $(RESOURCES)
@cp $(BUILD_DIR)/debug/$(APP_NAME) $(MACOS)/$(APP_NAME)
@cp Resources/Info.plist $(CONTENTS)/Info.plist
@codesign --force --sign - $(APP_BUNDLE)
@echo "Built $(APP_BUNDLE) (debug)"
run: bundle-debug
@open $(APP_BUNDLE)
run-release: bundle
@open $(APP_BUNDLE)
clean:
swift package clean
rm -rf $(APP_BUNDLE)