realigned some preprocess to the left.
[platform/upstream/iotivity.git] / auto_build.sh
index 806bf6a..2a09953 100755 (executable)
@@ -63,22 +63,25 @@ function build_android()
        # 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"
 
+       build_android_x86 $1 $2
+       build_android_armeabi $1 $2
+}
+
+function build_android_x86()
+{
        echo "*********** Build for android x86 *************"
        scons TARGET_OS=android TARGET_ARCH=x86 RELEASE=$1 TARGET_TRANSPORT=IP $2
        scons TARGET_OS=android TARGET_ARCH=x86 RELEASE=$1 TARGET_TRANSPORT=BT $2
        scons TARGET_OS=android TARGET_ARCH=x86 RELEASE=$1 TARGET_TRANSPORT=BLE $2
+}
 
+function build_android_armeabi()
+{
        echo "*********** Build for android armeabi *************"
        scons TARGET_OS=android TARGET_ARCH=armeabi RELEASE=$1 TARGET_TRANSPORT=IP $2
        scons TARGET_OS=android TARGET_ARCH=armeabi RELEASE=$1 TARGET_TRANSPORT=BT $2
        scons TARGET_OS=android TARGET_ARCH=armeabi RELEASE=$1 TARGET_TRANSPORT=BLE $2
-
-       # enable parallel build
-       export SCONSFLAGS="-Q -j 4"
 }
 
 function build_arduino()
@@ -186,6 +189,14 @@ then
        then
                build_android true
                build_android false
+       elif [ $1 = 'android_x86' ]
+       then
+        build_android_x86 true
+        build_android_x86 false
+       elif [ $1 = 'android_armeabi' ]
+       then
+        build_android_armeabi true
+        build_android_armeabi false
        elif [ $1 = 'arduino' ]
        then
                build_arduino true