forked from LoPablo/MiddleClick
-
-
Notifications
You must be signed in to change notification settings - Fork 124
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (38 loc) · 1.49 KB
/
Makefile
File metadata and controls
50 lines (38 loc) · 1.49 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
48
49
50
all: archive export compress
## Development targets
.PHONY: run force-build clean-build
# Find all source files to track dependencies
SOURCES := $(shell find MiddleClick MoreTouch ConfigCore -type f \( -name "*.swift" -o -name "*.h" -o -name "*.m" \) 2>/dev/null)
# Stamp file to track last build
BUILD_STAMP := ./build/.build-stamp
# Only build if sources changed since last build
$(BUILD_STAMP): $(SOURCES)
@echo "🔨 Building MiddleClick (Debug)..."
@xcodebuild -project MiddleClick.xcodeproj -scheme MiddleClick -configuration Debug build | grep -E "BUILD (SUCCEEDED|FAILED)|error:" || true
@echo "✅ Build succeeded!"
@mkdir -p $(dir $(BUILD_STAMP))
@touch $(BUILD_STAMP)
build-debug: $(BUILD_STAMP)
run: $(BUILD_STAMP)
@echo "🚀 Running MiddleClick..."
@BUILD_SKIP=1 ./scripts/build-and-run.sh
force-build:
@rm -f $(BUILD_STAMP)
@$(MAKE) build-debug
clean-build:
@rm -f $(BUILD_STAMP)
@echo "🧹 Build stamp cleaned"
## Release targets
archive:
xcodebuild -project MiddleClick.xcodeproj -scheme MiddleClick -configuration Release archive
export:
xcodebuild -exportArchive \
-archivePath "$(shell ls -td ~/Library/Developer/Xcode/Archives/*/MiddleClick*.xcarchive | head -1)" \
-exportPath "$(shell pwd)/build" \
-exportOptionsPlist ./build-config/ExportOptions.plist
compress:
cd ./build && \
rm -f ./MiddleClick.zip && \
zip -r9 ./MiddleClick.zip ./MiddleClick.app
create-cert:
security export -k ~/Library/Keychains/login.keychain-db -t identities -f pkcs12 | base64 | pbcopy