This repository has been archived by the owner on Feb 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
executable file
·36 lines (27 loc) · 1.95 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
XBUILD=/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
BUILD_DIR=build
BINDING_DIR=binding
PROJECT=Pods/Pods.xcodeproj
TARGET=IQKeyboardManager
BINDING_PROJECT=Xamarin.IQKeyboardManager
all: copyoutput
sharpiebuild:
sharpie pod init -force ios $(TARGET)
sharpie pod bind
xbuildbuild: sharpiebuild
$(XBUILD) ONLY_ACTIVE_ARCH=NO OTHER_CFLAGS="-fembed-bitcode" -project $(PROJECT) -target $(TARGET) -sdk iphonesimulator -configuration Release clean build
$(XBUILD) ONLY_ACTIVE_ARCH=NO OTHER_CFLAGS="-fembed-bitcode" -project $(PROJECT) -target $(TARGET) -sdk iphoneos -configuration Release clean build
makeafatty: xbuildbuild
lipo -create -output $(BINDING_DIR)/$(TARGET).framework/$(TARGET) $(BUILD_DIR)/Release-iphoneos/$(TARGET)/$(TARGET).framework/$(TARGET) $(BUILD_DIR)/Release-iphonesimulator/$(TARGET)/$(TARGET).framework/$(TARGET)
copyoutput: makeafatty
yes | cp -r $(BINDING_DIR)/$(TARGET).framework $(BINDING_PROJECT)
xbuildbuildonly:
$(XBUILD) ONLY_ACTIVE_ARCH=NO OTHER_CFLAGS="-fembed-bitcode" -project $(PROJECT) -target $(TARGET) -sdk iphonesimulator -configuration Release clean build
$(XBUILD) ONLY_ACTIVE_ARCH=NO OTHER_CFLAGS="-fembed-bitcode" -project $(PROJECT) -target $(TARGET) -sdk iphoneos -configuration Release clean build
stripbitcode: xbuildbuildonly
xcrun bitcode_strip -r $(BUILD_DIR)/Release-iphoneos/$(TARGET)/$(TARGET).framework/$(TARGET) -o $(BUILD_DIR)/Release-iphoneos/$(TARGET)/$(TARGET).framework/$(TARGET)
xcrun bitcode_strip -r $(BUILD_DIR)/Release-iphonesimulator/$(TARGET)/$(TARGET).framework/$(TARGET) -o $(BUILD_DIR)/Release-iphonesimulator/$(TARGET)/$(TARGET).framework/$(TARGET)
makeafattyonly: stripbitcode
lipo -create -output $(BINDING_DIR)/$(TARGET).framework/$(TARGET) $(BUILD_DIR)/Release-iphoneos/$(TARGET)/$(TARGET).framework/$(TARGET) $(BUILD_DIR)/Release-iphonesimulator/$(TARGET)/$(TARGET).framework/$(TARGET)
copyoutputonly: makeafattyonly
yes | cp -r $(BINDING_DIR)/$(TARGET).framework $(BINDING_PROJECT)