Update cloud project
[platform/upstream/iotivity.git] / auto_build.sh
index 117c0a8..1a279d0 100755 (executable)
@@ -13,6 +13,9 @@ function build_all()
                build_linux_unsecured_with_ra $1 $2
                build_linux_secured_with_ra $1 $2
                build_linux_unsecured_with_rm $1 $2
+               build_linux_unsecured_with_rd $1 $2
+               build_linux_secured_with_rd $1 $2
+               build_simulator $1 $2
        fi
 
        build_android $1 $2
@@ -65,6 +68,18 @@ function build_linux_secured_with_ra()
        scons RELEASE=$1 WITH_RA=1 WITH_RA_IBB=1 SECURED=1 $2
 }
 
+function build_linux_unsecured_with_rd()
+{
+       echo "*********** Build for linux With Resource Directory *************"
+       scons RELEASE=$1 WITH_RD=1 $2
+}
+
+function build_linux_secured_with_rd()
+{
+       echo "*********** Build for linux With Resource Directory & Security ************"
+       scons RELEASE=$1 WITH_RD=1 SECURED=1 $2
+}
+
 function build_android()
 {
        # Note: for android, as oic-resource uses C++11 feature stoi and to_string,
@@ -136,6 +151,9 @@ function build_tizen()
        echo "*********** Build for Tizen octbstack lib and sample *************"
        scons -f resource/csdk/stack/samples/tizen/build/SConscript TARGET_OS=tizen TARGET_TRANSPORT=IP LOGGING=true RELEASE=$1 $2
 
+       echo "*********** Build for Tizen octbstack lib and sample with Security*************"
+       scons -f resource/csdk/stack/samples/tizen/build/SConscript TARGET_OS=tizen TARGET_TRANSPORT=IP LOGGING=true SECURED=1 RELEASE=$1 $2
+
        echo "*********** Build for Tizen octbstack lib and sample with Routing Manager*************"
        scons -f resource/csdk/stack/samples/tizen/build/SConscript TARGET_OS=tizen TARGET_TRANSPORT=IP LOGGING=true ROUTING=GW RELEASE=$1 $2
 }
@@ -161,6 +179,12 @@ function build_darwin() # Mac OSx and iOS
        scons TARGET_OS=ios TARGET_ARCH=arm64 SYS_VERSION=7.0 RELEASE=$1 $2
 }
 
+function build_simulator()
+{
+       echo "*********** Build for simulator plugin *************"
+       scons SIMULATOR=1 RELEASE=$1 $2
+}
+
 function unit_tests()
 {
        echo "*********** Unit test Start *************"
@@ -175,8 +199,8 @@ function  help()
        echo "Usage:"
         echo "  build:"
         echo "     `basename $0` <target_build>"
-       echo "      Allowed values for <target_build>: all, linux_unsecured, linux_secured, linux_unsecured_with_ra, linux_secured_with_ra, android, arduino, tizen, darwin"
-       echo "      Note: \"linux\" will build \"linux_unsecured\", \"linux_secured\", \"linux_unsecured_with_ra\" & \"linux_secured_with_ra\"."
+       echo "      Allowed values for <target_build>: all, linux_unsecured, linux_secured, linux_unsecured_with_ra, linux_secured_with_ra, linux_unsecured_with_rd, linux_secured_with_rd, android, arduino, tizen, simulator darwin"
+       echo "      Note: \"linux\" will build \"linux_unsecured\", \"linux_secured\", \"linux_unsecured_with_ra\", \"linux_secured_with_ra\", \"linux_secured_with_rd\" & \"linux_unsecured_with_rd\"."
        echo "      Any selection will build both debug and release versions of all available targets in the scope you've"
        echo "      selected. To choose any specific command, please use the SCons commandline directly. Please refer"
        echo "      to [IOTIVITY_REPO]/Readme.scons.txt."
@@ -221,6 +245,14 @@ then
        then
                build_linux_secured_with_ra true
                build_linux_secured_with_ra false
+       elif [ $1 = 'linux_unsecured_with_rd' ]
+       then
+               build_linux_unsecured_with_rd true
+               build_linux_unsecured_with_rd false
+       elif [ $1 = 'linux_secured_with_rd' ]
+       then
+               build_linux_secured_with_rd true
+               build_linux_secured_with_rd false
        elif [ $1 = 'android' ]
        then
                build_android true
@@ -245,6 +277,10 @@ then
        then
                build_tizen true
                build_tizen false
+       elif [ $1 = 'simulator' ]
+    then
+               build_simulator true
+               build_simulator false
        elif [ $1 = 'darwin' ]
        then
                build_darwin true