-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
40 lines (34 loc) · 1.48 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
# Makefile for building and updating a cordova plugin from a cocoapod spec.
#
# You need to first configure your podfile.
# See the documentation at:
# http://github.com/mkcode/cocoapod-to-cordova.git
#
# Targets:
#
# build: Builds the cocoapod target for release (ios SDKs and archs).
# Use this for vendoring the product into the plugin.
#
# build-sim: Builds the cocoapod target for use in the ios simulator.
# Use this for developing with the ios simulator.
#
default: build
pod: clean
pod install --no-integrate
build: pod
cd Pods && xcodebuild -configuration Release -sdk iphoneos -target $(shell head -n 1 build_target_name.txt)
mv $(shell head -n 1 product_path.txt) $(shell head -n 1 product_path.txt)-ios
cd Pods && xcodebuild -configuration Release -sdk iphonesimulator -target $(shell head -n 1 build_target_name.txt)
mv $(shell head -n 1 product_path.txt) $(shell head -n 1 product_path.txt)-sim
lipo -create $(shell head -n 1 product_path.txt)-ios $(shell head -n 1 product_path.txt)-sim -output $(shell head -n 1 product_path.txt)
rm $(shell head -n 1 product_path.txt)-ios
rm $(shell head -n 1 product_path.txt)-sim
build-ios: pod
cd Pods && xcodebuild -configuration Release -target $(shell head -n 1 build_target_name.txt)
build-sim: pod
cd Pods && xcodebuild -configuration Release -sdk iphonesimulator7.1 -target $(shell head -n 1 build_target_name.txt)
clean:
-rm -rf Pods
-rm Podfile.lock
-rm build_target_name.txt
-rm product_path.txt