-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (29 loc) · 954 Bytes
/
Copy pathMakefile
File metadata and controls
36 lines (29 loc) · 954 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
GHOSTTY_DIR ?= $(HOME)/ghostty
export DEVELOPER_DIR ?= /Applications/Xcode.app/Contents/Developer
SWIFT_BUILD_FLAGS = \
-Xlinker -L$(GHOSTTY_DIR)/zig-out/lib \
-Xlinker -lghostty \
-Xlinker -lc++ \
-Xlinker -framework -Xlinker Metal \
-Xlinker -framework -Xlinker Foundation \
-Xlinker -framework -Xlinker CoreGraphics \
-Xlinker -framework -Xlinker CoreText \
-Xlinker -framework -Xlinker QuartzCore \
-Xlinker -framework -Xlinker IOKit \
-Xlinker -framework -Xlinker IOSurface
.PHONY: build run release bundle clean
build:
swift build $(SWIFT_BUILD_FLAGS)
run: build
.build/debug/Ghostlight
release:
swift build -c release $(SWIFT_BUILD_FLAGS)
bundle: release
@mkdir -p Ghostlight.app/Contents/MacOS
@mkdir -p Ghostlight.app/Contents/Resources
@cp Info.plist Ghostlight.app/Contents/
@cp .build/release/Ghostlight Ghostlight.app/Contents/MacOS/
@echo "Created Ghostlight.app"
clean:
swift package clean
rm -rf Ghostlight.app