Files
OpenVPNAdapter/scripts/mac/build-openssl
Sergey Abramchuk e2ad2ab5d5 Squashed 'Sources/OpenVPNAdapter/Libraries/Vendors/openvpn/' content from commit 554d8b888
git-subtree-dir: Sources/OpenVPNAdapter/Libraries/Vendors/openvpn
git-subtree-split: 554d8b88817d3a7b836e78940ed61bb11ed2bd9b
2018-07-27 18:08:58 +03:00

33 lines
857 B
Bash
Executable File

#!/usr/bin/env bash
set -e
[ "$DEP_DIR" ] && cd $DEP_DIR
if [ -z "$O3" ]; then
echo O3 var must point to ovpn3 tree ; exit 1
fi
if [ -z "$DEP_DIR" ]; then
echo DEP_DIR var must point to ovpn3 dependency tree
exit 1
fi
cd $DEP_DIR
rm -rf openssl
mkdir openssl
for target in osx ; do
echo '***************' OpenSSL-32 $target
TARGET=$target OPENSSL_TARGET=darwin-i386-cc ARCH=i386 $O3/core/deps/openssl/build-openssl
echo '***************' OpenSSL-64 $target
TARGET=$target OPENSSL_TARGET=darwin64-x86_64-cc ARCH=x86_64 $O3/core/deps/openssl/build-openssl
cd openssl/openssl-$target
cp -a x86_64/include .
rm include/openssl/opensslconf.h # contains 32/64-bit specific references
for l in libcrypto.a libssl.a ; do
lipo -create */lib/$l -output $l
done
mkdir lib
mv *.a lib
cd ../..
done
exit 0