-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (21 loc) · 721 Bytes
/
Makefile
File metadata and controls
27 lines (21 loc) · 721 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
APP_NAME := itermfocus
APP_DIR := $(HOME)/bin/$(APP_NAME).app
BIN_LINK := $(HOME)/bin/$(APP_NAME)
LSREGISTER := /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister
.PHONY: build test install uninstall clean
build:
swift build -c release
test:
swift test
install: build
mkdir -p "$(APP_DIR)/Contents/MacOS"
cp .build/release/$(APP_NAME) "$(APP_DIR)/Contents/MacOS/$(APP_NAME)"
chmod +x "$(APP_DIR)/Contents/MacOS/$(APP_NAME)"
cp Resources/Info.plist "$(APP_DIR)/Contents/Info.plist"
$(LSREGISTER) -f "$(APP_DIR)"
ln -sf "$(APP_DIR)/Contents/MacOS/$(APP_NAME)" "$(BIN_LINK)"
uninstall:
rm -rf "$(APP_DIR)"
rm -f "$(BIN_LINK)"
clean:
swift package clean