Skip to content
Permalink
Browse files

libsupla-client build script updated

  • Loading branch information...
przemyslawzygmunt committed May 27, 2019
1 parent c618f34 commit d1f3af23f12970a0e0ad22fbfd64d3928aa13272
Showing with 17 additions and 5 deletions.
  1. +17 −5 supla-client/Tools/build_ios.sh
@@ -18,7 +18,7 @@

SDK_VERSION="8.2"
BUILD_CFG="Release"
IOS_OPENSSL_LIB_INC="/Users/AC/Public/openssl/include"
IOS_OPENSSL_LIB_INC="/Users/przemek/CProjects/openssl/OpenSSL-for-iPhone/include"

if [ ! -z $1 ]; then

@@ -40,20 +40,29 @@ fi
build()
{
ARCH=$1
PARAMS=""

if [[ "${ARCH}" == "armv7" || "${ARCH}" == "armv7s" ]]; then
TARGET_CPU="ARM"
else
TARGET_CPU=`echo -n ${ARCH} | awk '{ print toupper($0) }'`
fi

if [[ "${ARCH}" == "i386" || "${ARCH}" == "x86_64" ]]; then
PLATFORM="iPhoneSimulator"
PARAMS="-DTARGET_OS_SIMULATOR=1 -DTARGET_CPU_${TARGET_CPU} "
else
PLATFORM="iPhoneOS"
PARAMS="-DTARGET_OS_EMBEDDED=1 -DTARGET_CPU_${TARGET_CPU} "
fi

cd $BUILD_DIR

export CROSS_TOP="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer"
export CROSS_SDK="${PLATFORM}${SDK_VERSION}.sdk"

export PARAMS="-fembed-bitcode -I${IOS_OPENSSL_LIB_INC} -arch ${ARCH} -isysroot ${CROSS_TOP}/SDKs/${CROSS_SDK} -miphoneos-version-min=${SDK_VERSION}"

export PARAMS=${PARAMS}"-DTARGET_OS_IOS=1 -fembed-bitcode -I${IOS_OPENSSL_LIB_INC} -arch ${ARCH} -isysroot ${CROSS_TOP}/SDKs/${CROSS_SDK} -miphoneos-version-min=${SDK_VERSION}"
make clean
make

@@ -65,6 +74,7 @@ build()
CWD=`pwd`

build "armv7"
build "armv7s"
build "arm64"
build "x86_64"
build "i386"
@@ -73,9 +83,11 @@ echo $CWD
cd $CWD

lipo \
"${BUILD_DIR}/armv7s/libsupla-client.a" \
"${BUILD_DIR}/armv7/libsupla-client.a" \
"${BUILD_DIR}/arm64/libsupla-client.a" \
"${BUILD_DIR}/x86_64/libsupla-client.a" \
"${BUILD_DIR}/i386/libsupla-client.a" \
-create -output "${BUILD_DIR}/libsupla-client.a"

-create -output "${BUILD_DIR}/libsupla-client.a" \
&&
echo "${BUILD_DIR}/libsupla-client.a"

0 comments on commit d1f3af2

Please sign in to comment.
You can’t perform that action at this time.