-
-
Notifications
You must be signed in to change notification settings - Fork 57
/
Makefile
61 lines (48 loc) · 1.31 KB
/
Makefile
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
51
52
53
54
55
56
57
58
59
TARGET_CODESIGN = $(shell which ldid)
PLATFORM = iphoneos
NAME = feather
SCHEME ?= 'feather (Debug)'
RELEASE = Release-iphoneos
CONFIGURATION = Release
MACOSX_SYSROOT = $(shell xcrun -sdk macosx --show-sdk-path)
TARGET_SYSROOT = $(shell xcrun -sdk $(PLATFORM) --show-sdk-path)
APP_TMP = $(TMPDIR)/$(NAME)
STAGE_DIR = $(APP_TMP)/stage
APP_DIR = $(APP_TMP)/Build/Products/$(RELEASE)/$(NAME).app
all: package
package:
@rm -rf $(APP_TMP)
@set -o pipefail; \
xcodebuild \
-jobs $(shell sysctl -n hw.ncpu) \
-project '$(NAME).xcodeproj' \
-scheme $(SCHEME) \
-configuration $(CONFIGURATION) \
-arch arm64 -sdk $(PLATFORM) \
-derivedDataPath $(APP_TMP) \
CODE_SIGNING_ALLOWED=NO \
DSTROOT=$(APP_TMP)/install \
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO
@rm -rf Payload
@rm -rf $(STAGE_DIR)/
@mkdir -p $(STAGE_DIR)/Payload
@mv $(APP_DIR) $(STAGE_DIR)/Payload/$(NAME).app
@echo $(APP_TMP)
@echo $(STAGE_DIR)
@rm -rf $(STAGE_DIR)/Payload/$(NAME).app/_CodeSignature
@ln -sf $(STAGE_DIR)/Payload Payload
@rm -rf packages
@mkdir -p packages
ifeq ($(TIPA),1)
@zip -r9 packages/$(NAME)-ts.tipa Payload
else
@zip -r9 packages/$(NAME).ipa Payload
endif
clean:
@rm -rf $(STAGE_DIR)
@rm -rf packages
@rm -rf out.dmg
@rm -rf Payload
@rm -rf apple-include
@rm -rf $(APP_TMP)
.PHONY: apple-include