From f92c0cbea4b680799129706ac4d8cafc6fd57b18 Mon Sep 17 00:00:00 2001 From: Jihun Ha Date: Mon, 1 Aug 2016 10:54:48 +0900 Subject: [PATCH] Remote unused scons options for easy setup ES_ROLE, ES_TARGET_ENROLLEE, and ES_SOFTAP_MODE options are removed because they are not used anymore. Change-Id: I58811fc5ea2ac597d3a1056c95304fcbec4898d0 Signed-off-by: Jihun Ha Reviewed-on: https://gerrit.iotivity.org/gerrit/9875 Tested-by: jenkins-iotivity Reviewed-by: Madan Lanka --- build_common/SConscript | 6 ----- .../Build_Instructions_Android_Arduino.txt | 5 ++-- service/easy-setup/SConscript | 29 ++++++---------------- service/easy-setup/enrollee/SConscript | 24 ------------------ service/easy-setup/mediator/richsdk/SConscript | 2 -- 5 files changed, 9 insertions(+), 57 deletions(-) diff --git a/build_common/SConscript b/build_common/SConscript index ca26680..cc98457 100644 --- a/build_common/SConscript +++ b/build_common/SConscript @@ -112,12 +112,6 @@ help_vars.AddVariables(('DEVICE_NAME', 'Network display name for device (For Ard help_vars.Add(PathVariable('ANDROID_NDK', 'Android NDK path', None, PathVariable.PathAccept)) help_vars.Add(PathVariable('ANDROID_HOME', 'Android SDK path', None, PathVariable.PathAccept)) help_vars.Add(PathVariable('ANDROID_GRADLE', 'Gradle binary file', None, PathVariable.PathIsFile)) -#ES_TARGET_ENROLLEE is for specifying what is our target enrollee (Arduino or rest of platforms which support Multicast) -help_vars.Add(EnumVariable('ES_TARGET_ENROLLEE', 'Target Enrollee', 'arduino', allowed_values=('arduino', 'tizen', 'linux'))) -#ES_ROLE is for specifying the role (Enrollee or Mediator) for which scons is being executed -help_vars.Add(EnumVariable('ES_ROLE', 'Target build mode', 'mediator', allowed_values=('mediator', 'enrollee'))) -#ES_SOFT_MODE is for specifying MODE (Mode 1 : Enrollee with Soft AP or Mode 2 : Mediator with Soft AP) -help_vars.Add(EnumVariable('ES_SOFTAP_MODE', 'Target build mode', 'ENROLLEE_SOFTAP', allowed_values=('ENROLLEE_SOFTAP', 'MEDIATOR_SOFTAP'))) AddOption('--prefix', dest='prefix', diff --git a/service/easy-setup/Build_Instructions_Android_Arduino.txt b/service/easy-setup/Build_Instructions_Android_Arduino.txt index 80bfd14..e6081fa 100644 --- a/service/easy-setup/Build_Instructions_Android_Arduino.txt +++ b/service/easy-setup/Build_Instructions_Android_Arduino.txt @@ -43,8 +43,7 @@ Steps to build and deploy Easysetup Mediator in Android platform export ANDROID_NDK= a) In the IoTivity root source folder execute - scons TARGET_OS=android TARGET_ARCH=armeabi TARGET_TRANSPORT=IP ES_ROLE=mediator ES_TARGET_ENROLLEE={Platform} RELEASE=0 - Note : {Platform} can be -> arduino , linux, tizen + scons TARGET_OS=android TARGET_ARCH=armeabi TARGET_TRANSPORT=IP RELEASE=0 b) If the project is setup correctly, you should see a BUILD SUCCESSFUL message on the terminal You should see the .aar files generated inside of '/android/android_api/base/build/outputs/aar' directory. The .aar files contain jni directory and also a .jar file @@ -121,7 +120,7 @@ Steps to build and deploy Easysetup Mediator in Arduino platform Possible values for are: [Only ip is currently supported] -> IP : - $ scons service TARGET_OS=arduino BOARD=arduino_due_x_dbg TARGET_ARCH=arm SHIELD=WIFI ES_ROLE=enrollee RELEASE=0 + $ scons service TARGET_OS=arduino BOARD=arduino_due_x_dbg TARGET_ARCH=arm SHIELD=WIFI RELEASE=0 -> BLE : $ scons service TARGET_OS=arduino BOARD=arduino_due_x_dbg TARGET_ARCH=arm SHIELD=BLE RELEASE=0 [Currently not supporting] diff --git a/service/easy-setup/SConscript b/service/easy-setup/SConscript index 3028c08..12e985a 100755 --- a/service/easy-setup/SConscript +++ b/service/easy-setup/SConscript @@ -24,28 +24,13 @@ Import('env') es_target = env.get ('TARGET_OS') -es_role = env.get('ES_ROLE') -es_target_enrollee = env.get('ES_TARGET_ENROLLEE') -print "************************************************************************************" -print "Easysetup device role --> %s " % es_role -print "Target Platform --> %s " % es_target -print "Target Enrollee platform --> %s " % es_target_enrollee -print "************************************************************************************" +if es_target in ['linux']: + SConscript('mediator/SConscript') + SConscript('enrollee/SConscript') -#Go to build sample apps -if ('mediator' in es_role) : - print "Building Easysetup mediator SDKs [CSDK & RichSDK]" +if es_target in ['android']: + SConscript('mediator/SConscript') - if es_target in ['linux','android']: - SConscript('mediator/SConscript') - else : - print "****************************Mediator supports Linux and Android platform****************************" - -if ('enrollee' in es_role) : - print "Building Easysetup enrollee SDK" - - if es_target in ['linux', 'arduino', 'tizen']: - SConscript('enrollee/SConscript') - else : - print "****************************Enrollee supports linux, tizen and arduino platform****************************" \ No newline at end of file +if es_target in ['tizen']: + SConscript('enrollee/SConscript') diff --git a/service/easy-setup/enrollee/SConscript b/service/easy-setup/enrollee/SConscript index ce87d71..ce0ef7b 100644 --- a/service/easy-setup/enrollee/SConscript +++ b/service/easy-setup/enrollee/SConscript @@ -35,14 +35,6 @@ else: if enrollee_env.get('LOGGING'): enrollee_env.AppendUnique(CPPDEFINES = ['TB_LOG']) -# Enrollees are implemented for IP transport only. -if 'IP' in enrollee_env.get('TARGET_TRANSPORT'): - print "Enrollees are implemented for IP transport only" - enrollee_env.AppendUnique(CPPDEFINES = ['ESWIFI']) - -if enrollee_env.get('ES_SOFTAP_MODE') == 'ENROLLEE_SOFTAP': - enrollee_env.AppendUnique(CPPDEFINES = ['ENROLLEE_SOFTAP']) - ###################################################################### # Build flags ###################################################################### @@ -113,11 +105,7 @@ es_enrollee_src = None if target_os == 'linux': es_enrollee_common_src = [enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src/easysetup.c', - #enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src/onboarding.c', enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src/resourcehandler.c' - #enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src/softap.c', - #enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/linux/wifi/softapnative.c', - #enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/linux/wifi/networkhandler.c' ] enrollee_env.AppendUnique(es_enrollee_src = es_enrollee_common_src) @@ -127,11 +115,7 @@ if target_os == 'linux': if target_os == 'tizen': es_enrollee_common_src = [enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src/easysetup.c', - #enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src/onboarding.c', enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src/resourcehandler.c' - #enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src/softap.c', - #enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/linux/wifi/softapnative.c', - #enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/linux/wifi/networkhandler.c' ] enrollee_env.AppendUnique(es_enrollee_src = es_enrollee_common_src) @@ -141,16 +125,8 @@ if target_os == 'tizen': if target_os == 'arduino': es_sdk_static = enrollee_env.StaticLibrary('ESEnrolleeSDK', [ -# enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/arduino/easysetup.cpp', -# enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/arduino/onboarding.cpp', -# enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/arduino/softap.cpp', -# enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/arduino/resourcehandler.cpp', -# enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/arduino/wifi/networkhandler.cpp']) enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src/easysetup.c', - #enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src/onboarding.c', - #enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src/softap.c', enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src/resourcehandler.c' - #enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/arduino/wifi/networkhandler.cpp' ]) enrollee_env.InstallTarget(es_sdk_static, 'libESEnrolleeSDK') diff --git a/service/easy-setup/mediator/richsdk/SConscript b/service/easy-setup/mediator/richsdk/SConscript index f3600cf..7609acc 100644 --- a/service/easy-setup/mediator/richsdk/SConscript +++ b/service/easy-setup/mediator/richsdk/SConscript @@ -86,7 +86,6 @@ if target_os in ['linux']: easy_setup_env.AppendUnique(LIBS = ['ocpmapi', 'ocprovision']) if target_os in ['android','linux']: -#if target_os in ['linux']: easy_setup_env.PrependUnique(CPPPATH = [ env.get('SRC_DIR') + '/resource/c_common/oic_malloc/include', env.get('SRC_DIR') + '/resource/include', @@ -115,7 +114,6 @@ print"easysetup_path %s" % easysetup_path es_src = None if target_os in ['android','linux']: -#if target_os in ['linux']: if env.get('SECURED') == '1': env.AppendUnique(es_src = [os.path.join(easysetup_path, 'src/EnrolleeSecurity.cpp')]) -- 2.7.4