#******************************************************************
#
-# Copyright 2014 Samsung Electronics All Rights Reserved.
+# Copyright 2016 Samsung Electronics All Rights Reserved.
#
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#
#
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-##
-# easy-setup project build script
-##
-import os
-Import('env')
-
-# Add third party libraries
-lib_env = env.Clone()
-#SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', exports = 'lib_env')
-
-easy_setup_env = lib_env.Clone()
-target_os = env.get('TARGET_OS')
-######################################################################
-# Build flags
-######################################################################
-easy_setup_env.AppendUnique(CPPPATH = ['sdk/inc', 'sdk/src'])
-
-if target_os not in ['windows', 'winrt']:
- easy_setup_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall'])
- if target_os not in ['android', 'arduino']:
- easy_setup_env.AppendUnique(CXXFLAGS = ['-pthread'])
-
-if target_os == 'android':
- easy_setup_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
- easy_setup_env.PrependUnique(LIBS = ['oc', 'octbstack', 'gnustl_shared'])
-
-if target_os == 'arduino':
- easy_setup_env.AppendUnique(CPPPATH = [
- '../../resource/oc_logger/include',
- '../../resource/csdk/logger/include',
- '../../resource/csdk/stack/include',
- '../../extlibs/cjson',
- 'sdk/arduino/wifi/inc',
- 'sdk/arduino/wifi/src' ])
-
######################################################################
-# Source files and Targets
+# easy-setup project build script
######################################################################
+Import('env')
-#if target_os == 'arduino':
- es_src = env.Glob('sdk/src/*.cpp')
- es_src += env.Glob('sdk/arduino/wifi/src/*.cpp')
- es_sdk_static = easy_setup_env.StaticLibrary('ESSDKLibrary', es_src)
- easy_setup_env.InstallTarget(es_sdk_static, 'libESSDK')
-
-if target_os == 'android':
- es_src = env.Glob('sdk/src/*.cpp')
- es_src += env.Glob('sdk/android/wifi/src/*.cpp')
- es_sdk_static = easy_setup_env.StaticLibrary('ESLib', es_src)
- es_sdk_shared = easy_setup_env.SharedLibrary('ESLib', es_src)
- easy_setup_env.InstallTarget([es_sdk_static, es_sdk_shared], 'libESSDK')
+es_target = env.get ('TARGET_OS')
+es_role = env.get('ES_ROLE')
+es_target_enrollee = env.get('ES_TARGET_ENROLLEE')
-# Build JNI layer
-#if target_os == 'android':
-# SConscript(os.path.join('sdk', 'java', 'jni', 'SConscript'))
+print "************************************************************************************"
+print "Easysetup device role --> %s " % es_role
+print "Target Platform --> %s " % es_target
+print "Target Enrollee platform --> %s " % es_target_enrollee
+print "************************************************************************************"
#Go to build sample apps
-SConscript('sampleapp/SConscript')
+if ('mediator' in es_role) :
+ print "Building Easysetup mediator SDKs [CSDK & RichSDK]"
+
+ 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