3 # Ideally we will capture the exit code of each step and try them all before failing
4 # the build script. For now, use set -e and fail the build at first failure.
9 echo "*********** Clean build *************"
11 scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen -c
17 if [ $(uname -s) = "Linux" ]
19 echo "*********** Build for linux *************"
22 echo "*********** Build for linux with Security*************"
23 scons RELEASE=$3 SECURED=1
26 # Note: for android, as oic-resource uses C++11 feature stoi and to_string,
27 # it requires gcc-4.9, currently only android-ndk-r10(for linux)
28 # and windows android-ndk-r10(64bit target version) support these features.
29 echo "*********** Build Boost for android ***********"
30 # disable parallel build for android as gradle depends on scons to finish first
31 export SCONSFLAGS="-Q"
33 echo "*********** Build for android x86 *************"
34 scons TARGET_OS=android TARGET_ARCH=x86 RELEASE=$3 TARGET_TRANSPORT=IP
36 echo "*********** Build for android armeabi *************"
37 scons TARGET_OS=android TARGET_ARCH=armeabi RELEASE=$3 TARGET_TRANSPORT=IP
39 # enable parallel build
40 export SCONSFLAGS="-Q -j 4"
42 echo "*********** Build for arduino avr *************"
43 scons resource TARGET_OS=arduino UPLOAD=false BOARD=mega TARGET_ARCH=avr TARGET_TRANSPORT=IP SHIELD=ETH RELEASE=$3
44 scons resource TARGET_OS=arduino UPLOAD=false BOARD=mega TARGET_ARCH=avr TARGET_TRANSPORT=IP SHIELD=WIFI RELEASE=$3
46 echo "*********** Build for arduino arm *************"
47 scons resource TARGET_OS=arduino UPLOAD=false BOARD=arduino_due_x TARGET_ARCH=arm TARGET_TRANSPORT=IP SHIELD=ETH RELEASE=$3
48 scons resource TARGET_OS=arduino UPLOAD=false BOARD=arduino_due_x TARGET_ARCH=arm TARGET_TRANSPORT=IP SHIELD=WIFI RELEASE=$3
50 echo "*********** Build for Tizen CA lib and sample *************"
51 #scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen TARGET_TRANSPORT=IP LOGGING=true RELEASE=$3
53 echo "*********** Build for Tizen CA lib and sample with Security *************"
54 #scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen TARGET_TRANSPORT=IP LOGGING=true SECURED=1 RELEASE=$3
56 if [ $(uname -s) = "Darwin" ]
58 echo "*********** Build for OSX *************"
59 scons TARGET_OS=darwin SYS_VERSION=10.9 RELEASE=$3
61 echo "*********** Build for IOS i386 *************"
62 scons TARGET_OS=ios TARGET_ARCH=i386 SYS_VERSION=7.0 RELEASE=$3
64 echo "*********** Build for IOS x86_64 *************"
65 scons TARGET_OS=ios TARGET_ARCH=x86_64 SYS_VERSION=7.0 RELEASE=$3
67 echo "*********** Build for IOS armv7 *************"
68 scons TARGET_OS=ios TARGET_ARCH=armv7 SYS_VERSION=7.0 RELEASE=$3
70 echo "*********** Build for IOS armv7s *************"
71 scons TARGET_OS=ios TARGET_ARCH=armv7s SYS_VERSION=7.0 RELEASE=$3
73 echo "*********** Build for IOS arm64 *************"
74 scons TARGET_OS=ios TARGET_ARCH=arm64 SYS_VERSION=7.0 RELEASE=$3
82 echo " `basename $0` <path-to-android-ndk> <path-to-arduino-sdk>"
84 echo " `basename $0` -c"
103 # Suppress "Reading ..." message and enable parallel build
104 export SCONSFLAGS="-Q -j 4"
107 scons resource RELEASE=false -c
108 scons resource LOGGING=false RELEASE=false
109 scons resource TEST=1 RELEASE=false
110 echo "===================== done ====================="