-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (27 loc) · 868 Bytes
/
Makefile
File metadata and controls
34 lines (27 loc) · 868 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
APP := window-border
SRC := Sources/main.m
BUNDLE := WindowBorder.app
.PHONY: all app clean run
all: $(APP)
$(APP): $(SRC)
clang -fobjc-arc -O2 -Wall -Wextra -arch arm64 -arch x86_64 \
-framework Cocoa \
-framework CoreGraphics \
-framework ServiceManagement \
-o $@ $<
app: $(APP)
rm -rf $(BUNDLE)
mkdir -p $(BUNDLE)/Contents/MacOS $(BUNDLE)/Contents/Resources
cp $(APP) $(BUNDLE)/Contents/MacOS/WindowBorder
cp Info.plist $(BUNDLE)/Contents/Info.plist
cp AppIcon.icns $(BUNDLE)/Contents/Resources/AppIcon.icns
printf 'APPL????' > $(BUNDLE)/Contents/PkgInfo
# Build and copy into /Applications for everyday use.
install: app
rm -rf /Applications/$(BUNDLE)
cp -R $(BUNDLE) /Applications/
@echo "Installed to /Applications/$(BUNDLE). Open it, then use the menu-bar icon → Open at Login."
run: $(APP)
./$(APP)
clean:
rm -rf $(APP) $(BUNDLE)