-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.ios
27 lines (22 loc) · 1.36 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
26
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
lipo $(IOS_BINDING_OUTPUT)/x86_64.a $(IOS_BINDING_OUTPUT)/arm64.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="-mios-version-min=10.0 -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="-mios-version-min=10.0 -fembed-bitcode" \
GOOS=darwin GOARCH=arm CGO_ENABLED=1 BINDING_ARGS="-tags ios" \
make binding