Add RD_MODE build option on Tizen Platform
authorYounghyunJoo <yh_.joo@samsung.com>
Mon, 14 Nov 2016 08:06:24 +0000 (17:06 +0900)
committerHabib Virji <habib.virji@samsung.com>
Tue, 15 Nov 2016 11:10:30 +0000 (11:10 +0000)
- in case of building using gbsscript, can get RD_MODE option

Change-Id: I88a027e2ba050ce9eb622eabf3d988eba8db9c64
Signed-off-by: YounghyunJoo <yh_.joo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14281
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
gbsbuild.sh
tools/tizen/iotivity.spec

index e514e6a..a87ba42 100755 (executable)
@@ -59,6 +59,7 @@ withtcp=0
 withcloud=0
 withproxy=0
 withmq=OFF
+rdmode=CLIENT
 secured=0
 for ARGUMENT_VALUE in $*
 do
@@ -79,6 +80,10 @@ do
        withmq=PUB,SUB,BROKER
    fi
 
+   if [ "RD_MODE" = $ARGUMENT_VALUE ];then
+       rdmode=CLIENT,SERVER
+   fi
+
    if [ "SECURED" = $ARGUMENT_VALUE ];then
        secured=1
    fi
@@ -115,7 +120,7 @@ if [ ! -d .git ]; then
 fi
 
 echo "Calling core gbs build command"
-gbscommand="gbs build -A armv7l --define 'WITH_TCP $withtcp' --define 'WITH_CLOUD $withcloud' --define 'WITH_PROXY $withproxy' --define 'WITH_MQ $withmq' --define 'SECURED $secured' -B ~/GBS-ROOT-OIC --include-all --repository ./"
+gbscommand="gbs build -A armv7l --define 'WITH_TCP $withtcp' --define 'WITH_CLOUD $withcloud' --define 'WITH_PROXY $withproxy' --define 'WITH_MQ $withmq' --define 'RD_MODE $rdmode' --define 'SECURED $secured' -B ~/GBS-ROOT-OIC --include-all --repository ./"
 echo $gbscommand
 if eval $gbscommand; then
     echo "Build is successful"
index 6953a59..e070f2f 100644 (file)
@@ -65,6 +65,7 @@ Source1002: %{name}-test.manifest
 # Default values to be eventually overiden BEFORE or as gbs params:
 %{!?ES_TARGET_ENROLLEE: %define ES_TARGET_ENROLLEE tizen}
 %{!?LOGGING: %define LOGGING 1}
+%{!?RD_MODE: %define RD_MODE CLIENT}
 %{!?ROUTING: %define ROUTING EP}
 %{!?SECURED: %define SECURED 0}
 %{!?TARGET_ARCH: %define TARGET_ARCH %{_arch}}
@@ -165,6 +166,7 @@ scons %{JOB} --prefix=%{_prefix} \
     ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE} \
     LIB_INSTALL_DIR=%{_libdir} \
     LOGGING=%{LOGGING} \
+    RD_MODE=%{RD_MODE} \
     RELEASE=%{RELEASE} \
     ROUTING=%{ROUTING} \
     SECURED=%{SECURED} \
@@ -187,6 +189,7 @@ scons install --install-sandbox=%{buildroot} --prefix=%{_prefix} \
     ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE} \
     LIB_INSTALL_DIR=%{_libdir} \
     LOGGING=%{LOGGING} \
+    RD_MODE=%{RD_MODE} \
     RELEASE=%{RELEASE} \
     ROUTING=%{ROUTING} \
     SECURED=%{SECURED} \