5 echo "*********** Clean build *************"
12 if [ $(uname -s) = "Linux" ]
14 echo "*********** Build for linux *************"
18 # Note: for android, as oic-resource uses C++11 feature stoi and to_string,
19 # it requires gcc-4.9, currently only android-ndk-r10(for linux)
20 # and windows android-ndk-r10(64bit target version) support these features.
22 echo "*********** Build for android x86 *************"
23 scons TARGET_OS=android TARGET_ARCH=x86 ANDROID_NDK=$1 RELEASE=$3
25 echo "*********** Build for android armeabi *************"
26 scons TARGET_OS=android TARGET_ARCH=armeabi ANDROID_NDK=$1 RELEASE=$3
28 echo "*********** Build for android armeabi-v7a *************"
29 scons TARGET_OS=android TARGET_ARCH=armeabi-v7a ANDROID_NDK=$1 RELEASE=$3
31 echo "*********** Build for android armeabi-v7a-hard *************"
32 scons TARGET_OS=android TARGET_ARCH=armeabi-v7a-hard ANDROID_NDK=$1 RELEASE=$3
34 echo "*********** Build for arduino avr *************"
35 scons TARGET_OS=arduino TARGET_ARCH=avr ARDUINO_HOME=$2 RELEASE=$3
37 echo "*********** Build for arduino arm *************"
38 scons TARGET_OS=arduino TARGET_ARCH=arm ARDUINO_HOME=$2 RELEASE=$3
40 if [ $(uname -s) = "Darwin" ]
42 echo "*********** Build for OSX *************"
43 scons TARGET_OS=darwin SYS_VERSION=10.9 RELEASE=$3
45 echo "*********** Build for IOS i386 *************"
46 scons TARGET_OS=ios TARGET_ARCH=i386 SYS_VERSION=7.0 RELEASE=$3
48 echo "*********** Build for IOS x86_64 *************"
49 scons TARGET_OS=ios TARGET_ARCH=x86_64 SYS_VERSION=7.0 RELEASE=$3
51 echo "*********** Build for IOS armv7 *************"
52 scons TARGET_OS=ios TARGET_ARCH=armv7 SYS_VERSION=7.0 RELEASE=$3
54 echo "*********** Build for IOS armv7s *************"
55 scons TARGET_OS=ios TARGET_ARCH=armv7s SYS_VERSION=7.0 RELEASE=$3
57 echo "*********** Build for IOS arm64 *************"
58 scons TARGET_OS=ios TARGET_ARCH=arm64 SYS_VERSION=7.0 RELEASE=$3
66 echo " `basename $0` <path-to-android-ndk> <path-to-arduino-home>"
68 echo " `basename $0` -c"
87 # Suppress "Reading ..." message and enable parallel build
88 export SCONSFLAGS="-Q -j 8"
91 echo "===================== done ====================="