Update ResourceCache codes for expiry Timer
[platform/upstream/iotivity.git] / auto_build.sh
index efe7530..4defa66 100755 (executable)
@@ -8,6 +8,7 @@ function clean()
 {
        echo "*********** Clean build *************"
        scons -c
+       scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen -c
        rm -rf out
 }
 
@@ -15,35 +16,48 @@ function build()
 {
        if [ $(uname -s) = "Linux" ]
         then
-               echo "*********** Build for linux *************"
+               echo "*********** Build for linux ************"
                scons RELEASE=$3
+
+               echo "*********** Build for linux with Security *************"
+               scons RELEASE=$3 SECURED=1
+
+               echo "*********** Build for linux With Remote Access *************"
+               scons RELEASE=$3 WITH_RA=1
+
+               echo "*********** Build for linux With Remote Access & Security ************"
+               scons RELEASE=$3 WITH_RA=1 SECURED=1
        fi
 
        # Note: for android, as oic-resource uses C++11 feature stoi and to_string,
        # it requires gcc-4.9, currently only android-ndk-r10(for linux)
        # and windows android-ndk-r10(64bit target version) support these features.
+       echo "*********** Build Boost for android ***********"
+       # disable parallel build for android as gradle depends on scons to finish first
+       export SCONSFLAGS="-Q"
 
-       if [ "$BUILD_FOR_ANDROID" = "true" ]
-               then
-
-               echo "*********** Build for android x86 *************"
-               scons TARGET_OS=android TARGET_ARCH=x86 ANDROID_NDK=$1 RELEASE=$3
-
-               echo "*********** Build for android armeabi *************"
-               scons TARGET_OS=android TARGET_ARCH=armeabi ANDROID_NDK=$1 RELEASE=$3
+       echo "*********** Build for android x86 *************"
+       scons TARGET_OS=android TARGET_ARCH=x86 RELEASE=$3 TARGET_TRANSPORT=IP
 
-               echo "*********** Build for android armeabi-v7a *************"
-               scons TARGET_OS=android TARGET_ARCH=armeabi-v7a ANDROID_NDK=$1 RELEASE=$3
+       echo "*********** Build for android armeabi *************"
+       scons TARGET_OS=android TARGET_ARCH=armeabi RELEASE=$3 TARGET_TRANSPORT=IP
 
-               echo "*********** Build for android armeabi-v7a-hard *************"
-               scons TARGET_OS=android TARGET_ARCH=armeabi-v7a-hard ANDROID_NDK=$1 RELEASE=$3
-       fi
+       # enable parallel build
+       export SCONSFLAGS="-Q -j 4"
 
        echo "*********** Build for arduino avr *************"
-       scons TARGET_OS=arduino TARGET_ARCH=avr ARDUINO_HOME=$2 RELEASE=$3
+       scons resource TARGET_OS=arduino UPLOAD=false BOARD=mega TARGET_ARCH=avr TARGET_TRANSPORT=IP SHIELD=ETH RELEASE=$3
+       scons resource TARGET_OS=arduino UPLOAD=false BOARD=mega TARGET_ARCH=avr TARGET_TRANSPORT=IP SHIELD=WIFI RELEASE=$3
 
        echo "*********** Build for arduino arm *************"
-       scons TARGET_OS=arduino TARGET_ARCH=arm ARDUINO_HOME=$2 RELEASE=$3
+       scons resource TARGET_OS=arduino UPLOAD=false BOARD=arduino_due_x TARGET_ARCH=arm TARGET_TRANSPORT=IP SHIELD=ETH RELEASE=$3
+       scons resource TARGET_OS=arduino UPLOAD=false BOARD=arduino_due_x TARGET_ARCH=arm TARGET_TRANSPORT=IP SHIELD=WIFI RELEASE=$3
+
+       echo "*********** Build for Tizen CA lib and sample *************"
+    #scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen TARGET_TRANSPORT=IP LOGGING=true RELEASE=$3
+
+       echo "*********** Build for Tizen CA lib and sample with Security *************"
+    #scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen TARGET_TRANSPORT=IP LOGGING=true SECURED=1 RELEASE=$3
 
        if [ $(uname -s) = "Darwin" ]
        then
@@ -71,7 +85,7 @@ function  help()
 {
        echo "Usage:"
         echo "  build:"
-        echo "     `basename $0` <path-to-android-ndk> <path-to-arduino-home>"
+        echo "     `basename $0` <path-to-android-ndk> <path-to-arduino-sdk>"
         echo "  clean:"
         echo "     `basename $0` -c"
 }
@@ -93,7 +107,12 @@ then
 fi
 
 # Suppress "Reading ..." message and enable parallel build
-export SCONSFLAGS="-Q -j 8"
+export SCONSFLAGS="-Q -j 4"
 build $1 $2 true
 build $1 $2 false
+scons resource RELEASE=false -c
+scons resource LOGGING=false RELEASE=false
+scons resource TEST=1 RELEASE=false
 echo "===================== done ====================="
+
+