-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (38 loc) · 1.42 KB
/
Copy pathMakefile
File metadata and controls
47 lines (38 loc) · 1.42 KB
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
41
42
43
44
45
46
47
.PHONY: build run clean bundle bundle-universal dmg
APP_NAME = Vibe Buddy
BUNDLE_DIR = build/$(APP_NAME).app
EXECUTABLE = VibeBuddy
build:
swift build
release:
swift build -c release
# Build universal binary (Intel + Apple Silicon)
release-universal:
swift build -c release --arch arm64 --arch x86_64
run: build
.build/debug/$(EXECUTABLE)
clean:
swift package clean
rm -rf build/
bundle: release
mkdir -p "$(BUNDLE_DIR)/Contents/MacOS"
mkdir -p "$(BUNDLE_DIR)/Contents/Resources"
cp .build/release/$(EXECUTABLE) "$(BUNDLE_DIR)/Contents/MacOS/"
cp Info.plist "$(BUNDLE_DIR)/Contents/"
@if [ -d ".build/release/VibeBuddy_VibeBuddy.bundle" ]; then \
cp -R .build/release/VibeBuddy_VibeBuddy.bundle "$(BUNDLE_DIR)/Contents/Resources/"; \
fi
@echo "Built $(BUNDLE_DIR)"
# Build universal .app (Intel + Apple Silicon)
bundle-universal: release-universal
mkdir -p "$(BUNDLE_DIR)/Contents/MacOS"
mkdir -p "$(BUNDLE_DIR)/Contents/Resources"
cp .build/apple/Products/Release/$(EXECUTABLE) "$(BUNDLE_DIR)/Contents/MacOS/"
cp Info.plist "$(BUNDLE_DIR)/Contents/"
@if [ -d ".build/apple/Products/Release/VibeBuddy_VibeBuddy.bundle" ]; then \
cp -R .build/apple/Products/Release/VibeBuddy_VibeBuddy.bundle "$(BUNDLE_DIR)/Contents/Resources/"; \
fi
@echo "Built universal $(BUNDLE_DIR)"
dmg: bundle
hdiutil create -volname "Vibe Buddy" -srcfolder "$(BUNDLE_DIR)" -ov -format UDZO build/VibeBuddy.dmg
@echo "Created build/VibeBuddy.dmg"