From b24d9a53337ebb768fa7fa250a80361622a02122 Mon Sep 17 00:00:00 2001 From: dapperstout Date: Tue, 5 May 2015 20:25:00 +0200 Subject: [PATCH] Add support for creating a dynamically linked framework. --- create-openssl-framework.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/create-openssl-framework.sh b/create-openssl-framework.sh index b00eae8..09bff1c 100755 --- a/create-openssl-framework.sh +++ b/create-openssl-framework.sh @@ -12,8 +12,14 @@ if [ -d $FWNAME.framework ]; then rm -rf $FWNAME.framework fi +if [ "$1" == "dynamic" ]; then + LIBTOOL_FLAGS="-dynamic -undefined dynamic_lookup" +else + LIBTOOL_FLAGS="-static" +fi + echo "Creating $FWNAME.framework" mkdir -p $FWNAME.framework/Headers -libtool -no_warning_for_no_symbols -static -o $FWNAME.framework/$FWNAME lib/libcrypto.a lib/libssl.a +libtool -no_warning_for_no_symbols $LIBTOOL_FLAGS -o $FWNAME.framework/$FWNAME lib/libcrypto.a lib/libssl.a cp -r include/$FWNAME/* $FWNAME.framework/Headers/ echo "Created $FWNAME.framework"