Fix OpenSSL building in iOS example.

This commit is contained in:
levlam 2022-10-14 23:09:16 +03:00
parent ec86b34d55
commit bfd8c8dcf3
2 changed files with 10 additions and 10 deletions

View File

@ -1,5 +1,5 @@
diff --git a/Makefile b/Makefile
index 695be54..9d4f4a4 100644
index 695be54..eda7b0d 100644
--- a/Makefile
+++ b/Makefile
@@ -7,8 +7,11 @@
@ -96,9 +96,9 @@ index 695be54..9d4f4a4 100644
CROSS_SDK="$$(notdir $$(SDK_ROOT-$1))" \
- make all && make install
+ make build_libs && \
+ mkdir -p "$(PROJECT_DIR)/build/$2" && \
+ cp libcrypto.a libssl.a "$(PROJECT_DIR)/build/$2" && \
+ make install_sw
+ mkdir -p "$(PROJECT_DIR)/build/$2/openssl/lib" && \
+ cp libcrypto.a libssl.a "$(PROJECT_DIR)/build/$2/openssl/lib"
+ -cd $$(OPENSSL_DIR-$1) && make install_sw 2> /dev/null
# Unpack BZip2
$$(BZIP2_DIR-$1)/Makefile: downloads/bzip2-$(BZIP2_VERSION).tgz

View File

@ -26,12 +26,12 @@ do
echo $platform
cd Python-Apple-support
#NB: -j will fail
make OpenSSL-$platform
make OpenSSL-$platform || exit 1
cd ..
rm -rf third_party/openssl/$platform
mkdir -p third_party/openssl/$platform/lib
cp ./Python-Apple-support/build/$platform/libcrypto.a third_party/openssl/$platform/lib/
cp ./Python-Apple-support/build/$platform/libssl.a third_party/openssl/$platform/lib/
cp -r ./Python-Apple-support/build/$platform/openssl/include/ third_party/openssl/$platform/include
rm -rf third_party/openssl/$platform || exit 1
mkdir -p third_party/openssl/$platform/lib || exit 1
cp ./Python-Apple-support/build/$platform/libcrypto.a third_party/openssl/$platform/lib/ || exit 1
cp ./Python-Apple-support/build/$platform/libssl.a third_party/openssl/$platform/lib/ || exit 1
cp -r ./Python-Apple-support/build/$platform/openssl/include/ third_party/openssl/$platform/include || exit 1
done
done