- Add arm64 architecture support.
- Change base SDK to iOS 7.0.
This commit is contained in:
parent
de50c0797f
commit
05ea633636
|
@ -22,7 +22,7 @@
|
||||||
# Change values here #
|
# Change values here #
|
||||||
# #
|
# #
|
||||||
VERSION="1.0.1e" #
|
VERSION="1.0.1e" #
|
||||||
SDKVERSION="6.1" #
|
SDKVERSION="7.0" #
|
||||||
# #
|
# #
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# #
|
# #
|
||||||
|
@ -32,7 +32,7 @@ SDKVERSION="6.1" #
|
||||||
|
|
||||||
|
|
||||||
CURRENTPATH=`pwd`
|
CURRENTPATH=`pwd`
|
||||||
ARCHS="i386 armv7 armv7s"
|
ARCHS="i386 armv7 armv7s arm64"
|
||||||
DEVELOPER=`xcode-select -print-path`
|
DEVELOPER=`xcode-select -print-path`
|
||||||
|
|
||||||
if [ ! -d "$DEVELOPER" ]; then
|
if [ ! -d "$DEVELOPER" ]; then
|
||||||
|
@ -72,11 +72,12 @@ do
|
||||||
|
|
||||||
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"
|
||||||
|
export BUILD_TOOLS="${DEVELOPER}"
|
||||||
|
|
||||||
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="${CROSS_TOP}/usr/bin/gcc -arch ${ARCH}"
|
export CC="${BUILD_TOOLS}/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"
|
||||||
|
|
||||||
|
@ -87,7 +88,7 @@ do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# add -isysroot to CC=
|
# add -isysroot to CC=
|
||||||
sed -ie "s!^CFLAG=!CFLAG=-isysroot ${CROSS_TOP}/SDKs/${CROSS_SDK} !" "Makefile"
|
sed -ie "s!^CFLAG=!CFLAG=-isysroot ${CROSS_TOP}/Platforms/${PLATFORM}.platform/Developer/SDKs/${CROSS_SDK} -miphoneos-version-min=7.0 !" "Makefile"
|
||||||
|
|
||||||
make >> "${LOG}" 2>&1
|
make >> "${LOG}" 2>&1
|
||||||
make install >> "${LOG}" 2>&1
|
make install >> "${LOG}" 2>&1
|
||||||
|
@ -95,9 +96,9 @@ do
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Build library..."
|
echo "Build library..."
|
||||||
lipo -create ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/lib/libssl.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7.sdk/lib/libssl.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7s.sdk/lib/libssl.a -output ${CURRENTPATH}/lib/libssl.a
|
lipo -create ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/lib/libssl.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7.sdk/lib/libssl.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7s.sdk/lib/libssl.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-arm64.sdk/lib/libssl.a -output ${CURRENTPATH}/lib/libssl.a
|
||||||
|
|
||||||
lipo -create ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/lib/libcrypto.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7.sdk/lib/libcrypto.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7s.sdk/lib/libcrypto.a -output ${CURRENTPATH}/lib/libcrypto.a
|
lipo -create ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/lib/libcrypto.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7.sdk/lib/libcrypto.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7s.sdk/lib/libcrypto.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-arm64.sdk/lib/libcrypto.a -output ${CURRENTPATH}/lib/libcrypto.a
|
||||||
|
|
||||||
mkdir -p ${CURRENTPATH}/include
|
mkdir -p ${CURRENTPATH}/include
|
||||||
cp -R ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/include/openssl ${CURRENTPATH}/include/
|
cp -R ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/include/openssl ${CURRENTPATH}/include/
|
||||||
|
|
Loading…
Reference in New Issue