This repository has been archived by the owner on Dec 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
/
Makefile
58 lines (51 loc) · 1.5 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
ifeq (,${BUILD_D})
DERIVED_DATA=$(shell xcodebuild -workspace Restor.xcworkspace -scheme Restor -showBuildSettings | grep TARGET_BUILD_DIR | head -n1 | awk '{print $$3}')
else
DERIVED_DATA=${BUILD_D}
endif
NCPUS=$(shell expr $$(sysctl -n hw.ncpu) + 2)
TEAM_ID=EQHXZ8M8AV
.PHONY: list
list:
@echo "Available targets:"
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | \
awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | \
sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | \
xargs
.PHONY: .prebuild
.prebuild:
ifeq (,$(wildcard Pods))
@echo "Pods dir does not exist, running 'pod install'"
@pod install
endif
debug: .prebuild
@xcodebuild \
-derivedDataPath ${DERIVED_DATA} \
-parallelizeTargets -jobs ${NCPUS} \
-workspace Restor.xcworkspace \
-scheme Restor \
-configuration Debug \
build
release: .prebuild
@xcodebuild \
TEAM_ID=${TEAM_ID} \
DEVELOPMENT_TEAM=${TEAM_ID} \
-derivedDataPath ${DERIVED_DATA} \
-parallelizeTargets -jobs ${NCPUS} \
-workspace Restor.xcworkspace \
-scheme Restor \
-configuration Release \
build
@printf "\n\nApp Location: ${DERIVED_DATA}/Build/Products/Release/Restor.app\n"
google_release: .prebuild
@xcodebuild \
TEAM_ID=${TEAM_ID} \
-derivedDataPath ${DERIVED_DATA} \
-parallelizeTargets -jobs ${NCPUS} \
-workspace Restor.xcworkspace \
-scheme Restor \
-configuration Release \
build
clean:
@xcodebuild -workspace Restor.xcworkspace -scheme Restor clean
@rm -rf ${DERIVED_DATA}