From c637f773a99810bb101169f8e534d0d6b09f3396 Mon Sep 17 00:00:00 2001 From: Felix Schulze Date: Tue, 21 Feb 2012 20:41:47 +0100 Subject: [PATCH] Dynamic Developer path for Xcode 4.3 --- build-libssl.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build-libssl.sh b/build-libssl.sh index 73de9c2..4269ca1 100755 --- a/build-libssl.sh +++ b/build-libssl.sh @@ -33,6 +33,7 @@ SDKVERSION="5.0" # CURRENTPATH=`pwd` ARCHS="i386 armv6 armv7" +DEVELOPER=`xcode-select -print-path` set -e if [ ! -e openssl-${VERSION}.tar.gz ]; then @@ -63,13 +64,13 @@ do echo "Building openssl-${VERSION} for ${PLATFORM} ${SDKVERSION} ${ARCH}" echo "Please stand by..." - export CC="/Developer/Platforms/${PLATFORM}.platform/Developer/usr/bin/gcc -arch ${ARCH}" + export CC="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/usr/bin/gcc -arch ${ARCH}" mkdir -p "${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" LOG="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/build-openssl-${VERSION}.log" ./configure BSD-generic32 --openssldir="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" > "${LOG}" 2>&1 # add -isysroot to CC= - sed -ie "s!^CFLAG=!CFLAG=-isysroot /Developer/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDKVERSION}.sdk !" "Makefile" + sed -ie "s!^CFLAG=!CFLAG=-isysroot ${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDKVERSION}.sdk !" "Makefile" make >> "${LOG}" 2>&1 make install >> "${LOG}" 2>&1