forked from jerson/openpgp-mobile
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.ios
25 lines (21 loc) · 1.19 KB
/
Makefile.ios
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
IOS_OUTPUT?=ios
IOS_BINDING_OUTPUT?=$(BINDING_OUTPUT)/$(IOS_OUTPUT)
binding_ios: binding_ios_arm64 binding_ios_x86_64 binding_ios_armv7
lipo $(IOS_BINDING_OUTPUT)/x86_64.a $(IOS_BINDING_OUTPUT)/arm64.a $(IOS_BINDING_OUTPUT)/armv7.a -create -output $(IOS_BINDING_OUTPUT)/$(BINDING_NAME).a
cp $(IOS_BINDING_OUTPUT)/arm64.h $(IOS_BINDING_OUTPUT)/$(BINDING_NAME).h
rm $(IOS_BINDING_OUTPUT)/arm64.h $(IOS_BINDING_OUTPUT)/arm64.a $(IOS_BINDING_OUTPUT)/x86_64.h $(IOS_BINDING_OUTPUT)/x86_64.a $(IOS_BINDING_OUTPUT)/armv7.h $(IOS_BINDING_OUTPUT)/armv7.a
binding_ios_arm64:
BINDING_FILE=$(IOS_OUTPUT)/arm64.a BUILD_MODE="c-archive" \
SDK=iphoneos CC=$(PWD)/clangwrap.sh CGO_CFLAGS="-fembed-bitcode" \
GOOS=darwin GOARCH=arm64 CGO_ENABLED=1 BINDING_ARGS="-tags ios" \
make binding
binding_ios_x86_64:
BINDING_FILE=$(IOS_OUTPUT)/x86_64.a BUILD_MODE="c-archive" \
SDK=iphonesimulator CC=$(PWD)/clangwrap.sh \
GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 BINDING_ARGS="-tags ios" \
make binding
binding_ios_armv7:
BINDING_FILE=$(IOS_OUTPUT)/armv7.a BUILD_MODE="c-archive" \
SDK=iphoneos CC=$(PWD)/clangwrap.sh CGO_CFLAGS="-fembed-bitcode" \
GOOS=darwin GOARCH=arm CGO_ENABLED=1 BINDING_ARGS="-tags ios" \
make binding