Use the CROSS_* variables to simplify the script a bit.

This commit is contained in:
Stephane Peter 2012-07-22 05:08:12 -07:00
parent 60824d742d
commit 5089259366
1 changed files with 3 additions and 3 deletions

View File

@ -70,19 +70,19 @@ do
PLATFORM="iPhoneOS" PLATFORM="iPhoneOS"
fi fi
export CROSS_TOP="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/" export CROSS_TOP="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer"
export CROSS_SDK="${PLATFORM}${SDKVERSION}.sdk" export CROSS_SDK="${PLATFORM}${SDKVERSION}.sdk"
echo "Building openssl-${VERSION} for ${PLATFORM} ${SDKVERSION} ${ARCH}" echo "Building openssl-${VERSION} for ${PLATFORM} ${SDKVERSION} ${ARCH}"
echo "Please stand by..." echo "Please stand by..."
export CC="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/usr/bin/gcc -arch ${ARCH}" export CC="${CROSS_TOP}/usr/bin/gcc -arch ${ARCH}"
mkdir -p "${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" mkdir -p "${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk"
LOG="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/build-openssl-${VERSION}.log" LOG="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/build-openssl-${VERSION}.log"
./Configure iphoneos-cross --openssldir="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" > "${LOG}" 2>&1 ./Configure iphoneos-cross --openssldir="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" > "${LOG}" 2>&1
# add -isysroot to CC= # 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 ${CROSS_TOP}/SDKs/${CROSS_SDK} !" "Makefile"
make >> "${LOG}" 2>&1 make >> "${LOG}" 2>&1
make install >> "${LOG}" 2>&1 make install >> "${LOG}" 2>&1