forked from cory/tildefriends
		
	build: Get rid of the ios-specific OpenSSL build script. Now there is only one.
This commit is contained in:
		@@ -1196,7 +1196,8 @@ endif
 | 
			
		||||
ifeq ($(UNAME_S),Darwin)
 | 
			
		||||
IOS_DEPS := out/openssl/ios/ios64-xcrun/usr/local/lib/libssl.a
 | 
			
		||||
$(IOS_DEPS):
 | 
			
		||||
	+@tools/ssl-ios
 | 
			
		||||
	+@BUILD_PLATFORM=ios BUILD_TARGET=ios64-xcrun SSL_TARGET=ios64-xcrun OPTIONS="--static -static -Os -ffunction-sections -fdata-sections -fPIC -Wno-macro-redefined -miphoneos-version-min=9.0" tools/ssl-local
 | 
			
		||||
	+@BUILD_PLATFORM=ios BUILD_TARGET=iossimulator-xcrun SSL_TARGET=iossimulator-xcrun OPTIONS="--static -static -Os -ffunction-sections -fdata-sections -fPIC -Wno-macro-redefined" tools/ssl-local
 | 
			
		||||
$(filter $(BUILD_DIR)/ios%,$(APP_OBJS)): | $(IOS_DEPS)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,57 +0,0 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
API_LEVEL=28
 | 
			
		||||
 | 
			
		||||
BUILD_DIR=out/openssl_ios_build
 | 
			
		||||
 | 
			
		||||
BUILD_TARGETS="ios64-xcrun iossimulator-xcrun"
 | 
			
		||||
 | 
			
		||||
WORK_DIR=out/openssl-ios
 | 
			
		||||
rm -rf $WORK_DIR
 | 
			
		||||
cp -af deps/openssl_src/ $WORK_DIR
 | 
			
		||||
 | 
			
		||||
build_the_thing() {
 | 
			
		||||
    export PATH=$TOOLCHAIN/$TRIBLE/bin:$TOOLCHAIN/bin:$PATH
 | 
			
		||||
    echo $PATH
 | 
			
		||||
    echo "./Configure $SSL_TARGET $OPTIONS" && \
 | 
			
		||||
    ./Configure $SSL_TARGET $OPTIONS no-tests && \
 | 
			
		||||
    make clean && \
 | 
			
		||||
    make build_generated && \
 | 
			
		||||
    make libcrypto.a libssl.a || exit 128
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for build_target in $BUILD_TARGETS
 | 
			
		||||
do
 | 
			
		||||
    echo "Building $build_target"
 | 
			
		||||
    pwd
 | 
			
		||||
    pushd $WORK_DIR || exit 128
 | 
			
		||||
 | 
			
		||||
    case $build_target in
 | 
			
		||||
    ios64-xcrun)
 | 
			
		||||
        TRIBLE="arm64-darwin-ios"
 | 
			
		||||
        OPTIONS="--static -static -Os -ffunction-sections -fdata-sections -fPIC -Wno-macro-redefined -miphoneos-version-min=9.0"
 | 
			
		||||
        DESTDIR="/tmp/$BUILD_DIR/arm64-ios"
 | 
			
		||||
        SSL_TARGET="ios64-xcrun"
 | 
			
		||||
        CC=clang
 | 
			
		||||
    ;;
 | 
			
		||||
    iossimulator-xcrun)
 | 
			
		||||
        TRIBLE="x86_64-darwin-ios"
 | 
			
		||||
        OPTIONS="--static -static -Os -ffunction-sections -fdata-sections -fPIC -Wno-macro-redefined"
 | 
			
		||||
        DESTDIR="/tmp/$BUILD_DIR/x86_64-iossim"
 | 
			
		||||
        SSL_TARGET="iossimulator-xcrun"
 | 
			
		||||
        CC=clang
 | 
			
		||||
    ;;
 | 
			
		||||
    esac
 | 
			
		||||
 | 
			
		||||
    rm -rf $DESTDIR
 | 
			
		||||
    build_the_thing
 | 
			
		||||
    popd
 | 
			
		||||
    echo WORK_DIR=$WORK_DIR
 | 
			
		||||
    rm -rf out/openssl/ios/$build_target/
 | 
			
		||||
    mkdir -p out/openssl/ios/$build_target/usr/local/include/
 | 
			
		||||
    mkdir -p out/openssl/ios/$build_target/usr/local/lib/
 | 
			
		||||
    cp -R $WORK_DIR/include/* out/openssl/ios/$build_target/usr/local/include/
 | 
			
		||||
    cp $WORK_DIR/*.a out/openssl/ios/$build_target/usr/local/lib/
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
echo Success
 | 
			
		||||
		Reference in New Issue
	
	Block a user