Providing build option to disable BLE server
[platform/upstream/iotivity.git] / resource / csdk / stack / samples / tizen / build / gbsbuild.sh
index bde1850..141b8d8 100755 (executable)
@@ -7,6 +7,7 @@ name=`echo $name|cut -d" " -f 1`
 version=`echo $version|cut -d" " -f 1`
 
 name=oicri
+gbsarch=${gbsarch:=armv7l}
 
 echo $1
 export TARGET_TRANSPORT=$1
@@ -35,6 +36,9 @@ export WITH_PROXY=$8
 echo $9
 export WITH_MQ=$9
 
+echo $10
+export DISABLE_BLE_SERVER=$10
+
 echo $TARGET_TRANSPORT
 echo $BUILD_SAMPLE
 echo $WITH_MQ
@@ -103,8 +107,13 @@ if [ ! -d .git ]; then
    git commit -m "Initial commit"
 fi
 
+gbsprofile=${gbsprofile:=profile.tizen}
+gbscommand_prefix="gbs build -A ${gbsarch} -P ${gbsprofile} "
+nproc=$(expr 1 + $(expr `nproc --ignore=1` / 2 ) )
+gbscommand_prefix=${gbscommand_prefix}" --define '_smp_mflags -j${nproc}'"
+
 echo "Calling core gbs build command"
-gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-RI-OIC --include-all --repository ./ --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --define 'ROUTING $6' --define 'WITH_TCP $7' --define 'WITH_PROXY $8' --define 'WITH_MQ $9'"
+gbscommand=${gbscommand_prefix}" -B ~/GBS-ROOT-RI-OIC --include-all --repository ./ --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --define 'ROUTING $6' --define 'WITH_TCP $7' --define 'WITH_PROXY $8' --define 'WITH_MQ $9' --define 'DISABLE_BLE_SERVER $10'"
 echo $gbscommand
 if eval $gbscommand; then
    echo "Core build is successful"
@@ -127,7 +136,7 @@ if echo $BUILD_SAMPLE|grep -qi '^ON$'; then
       git commit -m "Initial commit"
    fi
    echo "Calling sample gbs build command"
-   gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-RI-OIC --include-all --repository ./ --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --define 'ROUTING $6' --define 'WITH_TCP $7' --define 'WITH_PROXY $8' --define 'WITH_MQ $9'"
+   gbscommand=${gbscommand_prefix}" -B ~/GBS-ROOT-RI-OIC --include-all --repository ./ --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --define 'ROUTING $6' --define 'WITH_TCP $7' --define 'WITH_PROXY $8' --define 'WITH_MQ $9'"
    echo $gbscommand
    if eval $gbscommand; then
       echo "Sample build is successful"