From d9aac64c8e54ea9fb0170c7511b12529389e6986 Mon Sep 17 00:00:00 2001 From: Trevor Bramwell Date: Thu, 7 Jan 2016 16:24:37 -0800 Subject: [PATCH] Simulator Build Adds a build for the IoTivity Simulator Eclipse plugin to auto_build.sh Change-Id: Ia98c34c004fff542c98b5f1d683cb98889926fe5 Signed-off-by: Trevor Bramwell Reviewed-on: https://gerrit.iotivity.org/gerrit/4773 Tested-by: jenkins-iotivity Reviewed-by: Harish Marappa Reviewed-by: Radha Bhavani Reviewed-by: Uze Choi --- auto_build.sh | 13 ++++++++++++- service/simulator/SConscript | 9 +++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/auto_build.sh b/auto_build.sh index 50fa09d..1a279d0 100755 --- a/auto_build.sh +++ b/auto_build.sh @@ -15,6 +15,7 @@ function build_all() build_linux_unsecured_with_rm $1 $2 build_linux_unsecured_with_rd $1 $2 build_linux_secured_with_rd $1 $2 + build_simulator $1 $2 fi build_android $1 $2 @@ -178,6 +179,12 @@ function build_darwin() # Mac OSx and iOS scons TARGET_OS=ios TARGET_ARCH=arm64 SYS_VERSION=7.0 RELEASE=$1 $2 } +function build_simulator() +{ + echo "*********** Build for simulator plugin *************" + scons SIMULATOR=1 RELEASE=$1 $2 +} + function unit_tests() { echo "*********** Unit test Start *************" @@ -192,7 +199,7 @@ function help() echo "Usage:" echo " build:" echo " `basename $0` " - echo " Allowed values for : all, linux_unsecured, linux_secured, linux_unsecured_with_ra, linux_secured_with_ra, linux_unsecured_with_rd, linux_secured_with_rd, android, arduino, tizen, darwin" + echo " Allowed values for : all, linux_unsecured, linux_secured, linux_unsecured_with_ra, linux_secured_with_ra, linux_unsecured_with_rd, linux_secured_with_rd, android, arduino, tizen, simulator darwin" echo " Note: \"linux\" will build \"linux_unsecured\", \"linux_secured\", \"linux_unsecured_with_ra\", \"linux_secured_with_ra\", \"linux_secured_with_rd\" & \"linux_unsecured_with_rd\"." echo " Any selection will build both debug and release versions of all available targets in the scope you've" echo " selected. To choose any specific command, please use the SCons commandline directly. Please refer" @@ -270,6 +277,10 @@ then then build_tizen true build_tizen false + elif [ $1 = 'simulator' ] + then + build_simulator true + build_simulator false elif [ $1 = 'darwin' ] then build_darwin true diff --git a/service/simulator/SConscript b/service/simulator/SConscript index 8e77c4e..867584f 100755 --- a/service/simulator/SConscript +++ b/service/simulator/SConscript @@ -26,7 +26,8 @@ import os, sys Import('env') lib_env = env.Clone() -SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env') +src_dir = env.get('SRC_DIR') +SConscript(src_dir + '/service/third_party_libs.scons', 'lib_env') simulator_env = lib_env.Clone() #Raml Parser @@ -68,7 +69,7 @@ java_headers.append(os.path.join(java_headers[0], 'solaris')) simulator_env.AppendUnique(CPPPATH = java_headers) simulator_env.AppendUnique(CPPPATH = ['../../extlibs/cjson']) -simulator_env.PrependUnique(LIBS = ['oc', 'RamlParser']) +simulator_env.PrependUnique(LIBS = ['oc', 'octbstack', 'RamlParser']) simulator_env.AppendUnique(LIBS = ['pthread']) simulator_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x']) @@ -82,8 +83,8 @@ simulator_src = [env.Glob('src/*.cpp') ] simulatorsdk = simulator_env.SharedLibrary('SimulatorManager', simulator_src) -simulator_env.InstallTarget(simulatorsdk, 'libSimulator') +simulator_env.InstallTarget(simulatorsdk, 'libSimulatorManager') #Build sample application SConscript('examples/server/SConscript') -SConscript('examples/client/SConscript') \ No newline at end of file +SConscript('examples/client/SConscript') -- 2.7.4