iOS: Fix to build iOS Iotivity library 1.3.0 55/23655/7
authorYogisha_Poojary <yogisha.poojary@lnttechservices.com>
Wed, 6 Dec 2017 10:03:15 +0000 (05:03 -0500)
committerMats Wichmann <mats@linux.com>
Wed, 10 Jan 2018 19:15:02 +0000 (19:15 +0000)
Bug: https://jira.iotivity.org/browse/IOT-1897 https://jira.iotivity.org/browse/IOT-2570

Change-Id: If8eb4fd34191da7144f39b9e6d1870209d17c9ca
Signed-off-by: Yogisha Poojary <yogisha.poojary@lnttechservices.com>
resource/SConscript
tools/darwin/mkfwk_ios.sh

index 737f538..ef3785b 100644 (file)
@@ -39,7 +39,9 @@ SConscript('#extlibs/libcoap/SConscript')
 # Build csdk
 SConscript('csdk/SConscript')
 
-if target_os not in ['darwin', 'ios']:
+
+if target_os not in ['darwin']:
+
     # Build liboc_logger
     SConscript('oc_logger/SConscript')
 
index 0d91809..3b87aeb 100755 (executable)
@@ -2,22 +2,59 @@
 #===============================================================================
 # Author:    Pete Goodliffe
 # Copyright: (c) Copyright 2009 Pete Goodliffe
-# Licence:   Please feel free to use this, with attribution
+# Licence:   Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 #===============================================================================
-
 #VERSION_IOS="${MAJOR_VERSION}.${MINOR_VERSION}.${RELEASE_NUMBER}.${BUILD_NUMBER}"
 VERSION_IOS="0.9.0.1"
 
 
 OUTDIR=$PWD/out/ios
-BUILD=debug
+BUILD=release
 LIBCOAP=libcoap
 SDKLIB=liboctbstack
+LIBC_COMMON=libc_common
+LIBCJSON=libcjson
+LIBCONNECTIVITY_ABSTRACTION_INTERNAL=libconnectivity_abstraction_internal
+LIBCONNECTIVITY_ABSTRACTION=libconnectivity_abstraction
+LIBESMEDIATORRICH=libESMediatorRich
+LIBLOGGER=liblogger
+LIBMBEDCRYPTO=libmbedcrypto
+LIBMBEDTLS=libmbedtls
+LIBMBEDX509=libmbedx509
+LIBNOTIFICATION_CONSUMER_WRAPPER=libnotification_consumer_wrapper
+LIBNOTIFICATION_CONSUMER=libnotification_consumer
+LIBNOTIFICATION_PROVIDER_WRAPPER=libnotification_provider_wrapper
+LIBNOTIFICATION_PROVIDER=libnotification_provider
+LIBOC_LOGGER_INTERNAL=liboc_logger_internal
+LIBOC_LOGGER=liboc_logger
+LIBOCLIB=liboc
+LIBOCPROVISION=libocprovision
+LIBOCSRM=libocsrm
+LIBOCTBSTACK_INTERNAL=liboctbstack_internal
+LIBRCS_CLIENT=librcs_client
+LIBRCS_COMMON=librcs_common
+LIBRCS_CONTAINER=librcs_container
+LIBRCS_SERVER=librcs_server
+LIBRESOURCE_DIRECTORY=libresource_directory
+LIBROUTINGMANAGER=libroutingmanager
+LIBSCENE_MANAGER=libscene_manager
+
 LIPO="xcrun -sdk iphoneos lipo"
 
 
 VERSION_TYPE=Alpha
-FRAMEWORK_NAME=iotivity-csdk
+FRAMEWORK_NAME=iotivity
 FRAMEWORK_VERSION=A
 FRAMEWORK_CURRENT_VERSION=${VERSION_IOS}
 FRAMEWORK_COMPATIBILITY_VERSION=${VERSION_IOS}
@@ -59,11 +96,37 @@ FATFILE=""
 
 for ARCH in $ARCHS
 do
-    echo "extracting $ARCH"
-       mkdir $OUTDIR/objs/$ARCH
-       lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBCOAP.a"
-       lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$SDKLIB.a"
-       ar -r $OUTDIR/objs/$ARCH.a $OUTDIR/objs/$ARCH/*.o
+echo "extracting $ARCH"
+mkdir $OUTDIR/objs/$ARCH
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBCOAP.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBC_COMMON.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBCJSON.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBCONNECTIVITY_ABSTRACTION_INTERNAL.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBCONNECTIVITY_ABSTRACTION.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBESMEDIATORRICH.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBLOGGER.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBOCLIB.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBMBEDCRYPTO.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBMBEDTLS.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBMBEDX509.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBNOTIFICATION_CONSUMER_WRAPPER.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBNOTIFICATION_CONSUMER.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBNOTIFICATION_PROVIDER_WRAPPER.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBNOTIFICATION_PROVIDER.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBOC_LOGGER_INTERNAL.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBOC_LOGGER.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBOCPROVISION.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBOCSRM.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBOCTBSTACK_INTERNAL.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$SDKLIB.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBRCS_CLIENT.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBRCS_COMMON.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBRCS_CONTAINER.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBRCS_SERVER.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBRESOURCE_DIRECTORY.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBROUTINGMANAGER.a"
+lipolite $OUTDIR/objs/$ARCH "$OUTDIR/$ARCH/$BUILD/$LIBSCENE_MANAGER.a"
+ar -r $OUTDIR/objs/$ARCH.a $OUTDIR/objs/$ARCH/*.o
 done
 
 
@@ -82,10 +145,15 @@ echo rm -rf objs
 find $OUTDIR/objs -name "*.o" | xargs rm
 
 echo "Framework: Copying includes..."
+cp -r  resource/include/*.h  $FRAMEWORK_BUNDLE/Headers
+cp -r  resource/oc_logger/include/*.h  $FRAMEWORK_BUNDLE/Headers
+cp -r  resource/oc_logger/include/*.hpp  $FRAMEWORK_BUNDLE/Headers
 cp -r  resource/csdk/stack/include/*.h  $FRAMEWORK_BUNDLE/Headers
-cp -r  resource/csdk/ocsocket/include/*.h  $FRAMEWORK_BUNDLE/Headers
-cp -r  resource/c_common/ocrandom/include/*.h  $FRAMEWORK_BUNDLE/Headers
-cp -r  resource/c_common/oic_malloc/include/*.h  $FRAMEWORK_BUNDLE/Headers
+cp -r  resource/csdk/include/*.h  $FRAMEWORK_BUNDLE/Headers
+cp -r  resource/c_common/*.h  $FRAMEWORK_BUNDLE/Headers
+cp -r  resource/csdk/resource-directory/include/*.h  $FRAMEWORK_BUNDLE/Headers
+cp -r  resource/oc_logger/include/targets/oc_ostream_logger.h  $FRAMEWORK_BUNDLE/Headers
+cp -r  $OUTDIR/arm64/$BUILD/resource/c_common/iotivity_config.h  $FRAMEWORK_BUNDLE/Headers
 
 echo "Framework: Creating plist..."
 cat > $FRAMEWORK_BUNDLE/Resources/Info.plist <<EOF