forked from sadopc/ScreenCapture
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (24 loc) · 964 Bytes
/
Makefile
File metadata and controls
31 lines (24 loc) · 964 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
PROJECT = ScreenCapture.xcodeproj
SCHEME = ScreenCapture
BUILD_DIR = .build
APP_DEBUG = $(BUILD_DIR)/Build/Products/Debug/ScreenCapture.app
APP_RELEASE = $(BUILD_DIR)/Build/Products/Release/ScreenCapture.app
BINARY = Contents/MacOS/ScreenCapture
# ad-hoc signing (no Apple certificate needed for local dev)
SIGN_FLAGS = CODE_SIGN_IDENTITY=- CODE_SIGNING_ALLOWED=YES
DEPLOY_TARGET = MACOSX_DEPLOYMENT_TARGET=15.0
# suppress xcodebuild noise; show only warnings/errors
XCODE_FLAGS = -project $(PROJECT) -scheme $(SCHEME) -derivedDataPath $(BUILD_DIR) -quiet $(SIGN_FLAGS) $(DEPLOY_TARGET)
.PHONY: run release build clean
# build debug and run in foreground (ctrl+c to quit)
run: build
@$(APP_DEBUG)/$(BINARY)
build:
@xcodebuild $(XCODE_FLAGS) -configuration Debug build
# build optimized release and run in foreground
release:
@xcodebuild $(XCODE_FLAGS) -configuration Release build
@$(APP_RELEASE)/$(BINARY)
clean:
@rm -rf $(BUILD_DIR)
@echo "cleaned"