Skip to content

Commit

Permalink
chore: test
Browse files Browse the repository at this point in the history
  • Loading branch information
jerson committed May 24, 2024
1 parent 6626408 commit 2101e67
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions Makefile.ios
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,32 @@ binding_ios: binding_ios_arm64 binding_ios_x86_64_sim
cp $(IOS_BINDING_OUTPUT)/arm64/*.h $(IOS_BINDING_OUTPUT)
rm -rf $(IOS_BINDING_OUTPUT)/arm64 $(IOS_BINDING_OUTPUT)/x86_64_sim $(IOS_BINDING_OUTPUT)/armv7

binding_ios_test: binding_ios_arm64 binding_ios_x86_64_sim binding_ios_arm64_sim
mkdir -p $(IOS_BINDING_OUTPUT)/sim
lipo $(IOS_BINDING_OUTPUT)/x86_64_sim/$(IOS_BINDING_NAME) $(IOS_BINDING_OUTPUT)/arm64_sim/$(IOS_BINDING_NAME) -create -output $(IOS_BINDING_OUTPUT)/sim/$(IOS_BINDING_NAME)
binding_ios_test: binding_ios_arm64 binding_ios_all_sim
lipo $(IOS_BINDING_OUTPUT)/sim/$(IOS_BINDING_NAME) $(IOS_BINDING_OUTPUT)/arm64/$(IOS_BINDING_NAME) -create -output $(IOS_BINDING_OUTPUT)/$(IOS_BINDING_NAME)
cp $(IOS_BINDING_OUTPUT)/arm64/*.h $(IOS_BINDING_OUTPUT)
rm -rf $(IOS_BINDING_OUTPUT)/arm64 $(IOS_BINDING_OUTPUT)/x86_64_sim $(IOS_BINDING_OUTPUT)/arm64_sim
rm -rf $(IOS_BINDING_OUTPUT)/arm64

binding_ios_xcframework: binding_ios_arm64 binding_ios_x86_64_sim binding_ios_arm64_sim
mkdir -p $(IOS_BINDING_OUTPUT)/sim
lipo $(IOS_BINDING_OUTPUT)/x86_64_sim/$(IOS_BINDING_NAME) $(IOS_BINDING_OUTPUT)/arm64_sim/$(IOS_BINDING_NAME) -create -output $(IOS_BINDING_OUTPUT)/sim/$(IOS_BINDING_NAME)
binding_ios_xcframework: binding_ios_arm64 binding_ios_all_sim
mkdir -p $(IOS_BINDING_OUTPUT)/headers
cp $(IOS_BINDING_OUTPUT)/arm64/*.h $(IOS_BINDING_OUTPUT)/headers
rm -rf $(IOS_BINDING_OUTPUT)/Openpgp.xcframework
xcodebuild -create-xcframework \
-library $(IOS_BINDING_OUTPUT)/arm64/$(IOS_BINDING_NAME) -headers $(IOS_BINDING_OUTPUT)/headers \
-library $(IOS_BINDING_OUTPUT)/sim/$(IOS_BINDING_NAME) -headers $(IOS_BINDING_OUTPUT)/headers \
-output $(IOS_BINDING_OUTPUT)/Openpgp.xcframework
rm -rf $(IOS_BINDING_OUTPUT)/arm64 $(IOS_BINDING_OUTPUT)/x86_64_sim $(IOS_BINDING_OUTPUT)/arm64_sim $(IOS_BINDING_OUTPUT)/sim $(IOS_BINDING_OUTPUT)/headers
rm -rf $(IOS_BINDING_OUTPUT)/arm64 $(IOS_BINDING_OUTPUT)/sim $(IOS_BINDING_OUTPUT)/headers

binding_ios_arm64:
BINDING_FILE=$(IOS_OUTPUT)/arm64/$(IOS_BINDING_NAME) BUILD_MODE="c-archive" \
SDK=iphoneos CC=$(PWD)/clangwrap.sh CGO_CFLAGS="-fembed-bitcode" \
GOOS=ios GOARCH=arm64 CGO_ENABLED=1 \
make binding

binding_ios_all_sim: binding_ios_x86_64_sim binding_ios_arm64_sim
mkdir -p $(IOS_BINDING_OUTPUT)/sim
lipo $(IOS_BINDING_OUTPUT)/x86_64_sim/$(IOS_BINDING_NAME) $(IOS_BINDING_OUTPUT)/arm64_sim/$(IOS_BINDING_NAME) -create -output $(IOS_BINDING_OUTPUT)/sim/$(IOS_BINDING_NAME)
rm -rf $(IOS_BINDING_OUTPUT)/x86_64_sim $(IOS_BINDING_OUTPUT)/arm64_sim

binding_ios_x86_64_sim:
CGO_LDFLAGS="-target arm64-apple-ios10-simulator" \
BINDING_FILE=$(IOS_OUTPUT)/x86_64_sim/$(IOS_BINDING_NAME) BUILD_MODE="c-archive" \
Expand Down

0 comments on commit 2101e67

Please sign in to comment.