X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gbsbuild.sh;h=58c2cdf66a4c7531965d31beb6b43762d72ea5e6;hb=3745889b0e361aebf4c48af55c3b30c39ba350d2;hp=633a2866dab399bbaa79756695f14e27ce5e5946;hpb=e50d2e0691efe9f522307a612d4fef468d8ff840;p=platform%2Fupstream%2Fiotivity.git diff --git a/gbsbuild.sh b/gbsbuild.sh index 633a286..58c2cdf 100755 --- a/gbsbuild.sh +++ b/gbsbuild.sh @@ -36,6 +36,7 @@ cp -R ./extlibs/tinydtls $sourcedir/tmp/extlibs cp -LR ./extlibs/sqlite3 $sourcedir/tmp/extlibs cp -R ./extlibs/timer $sourcedir/tmp/extlibs cp -R ./extlibs/rapidxml $sourcedir/tmp/extlibs +cp -R ./extlibs/libcoap $sourcedir/tmp/extlibs cp -R ./resource $sourcedir/tmp cp -R ./service $sourcedir/tmp cp ./extra_options.scons $sourcedir/tmp @@ -54,26 +55,9 @@ cp -R $sourcedir/iotivity.pc.in $sourcedir/tmp cd $sourcedir/tmp -echo `pwd` -if [ -d ./extlibs/mbedtls/mbedtls ];then - cd ./extlibs/mbedtls/mbedtls - git reset --hard ad249f509fd62a3bbea7ccd1fef605dbd482a7bd ; git apply ../ocf.patch - cd - - rm -rf ./extlibs/mbedtls/mbedtls/.git* - -else - echo "" - echo "*********************************** Error: ****************************************" - echo "* Please download mbedtls using the following command: *" - echo "* $ git clone https://github.com/ARMmbed/mbedtls.git extlibs/mbedtls/mbedtls *" - echo "***********************************************************************************" - echo "" - exit -fi rm -rf ./extlibs/tinycbor/tinycbor/.git* - -# Initialize Git repository +# Initialize Git repositoryㅣ if [ ! -d .git ]; then git init ./ git config user.email "you@example.com" @@ -84,15 +68,30 @@ fi withtcp=0 withcloud=0 -if [ "WITH_TCP" = "$1" ] || [ "WITH_TCP" = "$2" ];then - withtcp=1 -fi -if [ "WITH_CLOUD" = "$1" ] || [ "WITH_CLOUD" = "$2" ];then - withcloud=1 -fi +withproxy=0 +withmq=OFF +for ARGUMENT_VALUE in $* +do + echo $ARGUMENT_VALUE + if [ "WITH_TCP" = $ARGUMENT_VALUE ];then + withtcp=1 + fi + + if [ "WITH_CLOUD" = $ARGUMENT_VALUE ];then + withcloud=1 + fi + + if [ "WITH_PROXY" = $ARGUMENT_VALUE ];then + withproxy=1 + fi + + if [ "WITH_MQ" = $ARGUMENT_VALUE ];then + withmq=PUB,SUB,BROKER + fi +done echo "Calling core gbs build command" -gbscommand="gbs build -A armv7l --define 'WITH_TCP $withtcp' --define 'WITH_CLOUD $withcloud' -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' -B ~/GBS-ROOT-OIC --include-all --repository ./" echo $gbscommand if eval $gbscommand; then echo "Build is successful"