X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=service%2Fresource-container%2FSConscript;h=551d054700af314c14c046c4f681ac859d989527;hb=9dae1cd32d99938b6f86e2337229d54cac26bb5e;hp=45382d4ff3a83da28c1fc8f6ce626ae01fa98b40;hpb=7f042c3b4985a254764b4d8f81b9ffe2dff6abcd;p=platform%2Fupstream%2Fiotivity.git diff --git a/service/resource-container/SConscript b/service/resource-container/SConscript index 45382d4..551d054 100644 --- a/service/resource-container/SConscript +++ b/service/resource-container/SConscript @@ -37,7 +37,7 @@ env.AddMethod(filtered_glob, "FilteredGlob"); # Add third party libraries lib_env = env.Clone() -SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', exports = 'lib_env') +SConscript('#service/third_party_libs.scons', exports = 'lib_env') resource_container_env = lib_env.Clone() target_os = env.get('TARGET_OS') @@ -83,12 +83,12 @@ if int(containerJavaSupport): print '' -if target_os not in ['windows', 'winrt']: +if target_os not in ['windows']: resource_container_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall']) if target_os != 'android': resource_container_env.AppendUnique(CXXFLAGS = ['-pthread']) -if target_os not in ['darwin', 'ios', 'windows', 'winrt']: +if target_os not in ['darwin', 'ios', 'windows']: resource_container_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined']) if target_os == 'android': @@ -100,9 +100,22 @@ try: except KeyError: print '' - -resource_container_env.PrependUnique(LIBS = ['rcs_client', 'rcs_server', 'rcs_common', 'oc','octbstack', 'oc_logger', 'connectivity_abstraction']) -resource_container_env.AppendUnique(LIBS = ['dl', 'boost_system', 'boost_date_time', 'boost_thread']) +resource_container_env.PrependUnique(LIBS = ['coap']) +resource_container_env.AppendUnique(LIBS = ['connectivity_abstraction']) +resource_container_env.AppendUnique(LIBS = ['oc_logger']) +resource_container_env.AppendUnique(LIBS = ['octbstack']) +resource_container_env.AppendUnique(LIBS = ['oc']) +resource_container_env.AppendUnique(LIBS = ['rcs_client']) +resource_container_env.AppendUnique(LIBS = ['rcs_server']) +resource_container_env.AppendUnique(LIBS = ['rcs_common']) +resource_container_env.AppendUnique(LIBS = ['dl']) +resource_container_env.AppendUnique(LIBS = ['boost_system']) +resource_container_env.AppendUnique(LIBS = ['boost_date_time']) +resource_container_env.AppendUnique(LIBS = ['boost_thread']) + +if resource_container_env.get('SECURED') == '1': + if resource_container_env.get('WITH_TCP') == True: + resource_container_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto']) if int(containerJavaSupport): try: @@ -114,16 +127,13 @@ if int(containerJavaSupport): ###################################################################### # Source files and Targets ###################################################################### -res_container_src = ['src/BaseActivator.cpp','src/BundleActivator.cpp','src/RCSBundleInfo.cpp', - 'src/BundleInfoInternal.cpp', 'src/BundleResource.cpp', 'src/Configuration.cpp', 'src/JavaBundleResource.cpp', 'src/ProtocolBridgeResource.cpp', - 'src/ProtocolBridgeConnector.cpp', 'src/RCSResourceContainer.cpp', 'src/ResourceContainerBundleAPI.cpp', 'src/ResourceContainerImpl.cpp', - 'src/SoftSensorResource.cpp', 'src/DiscoverResourceUnit.cpp', 'src/RemoteResourceUnit.cpp', - ] +res_container_src = [ Glob('src/*.cpp') ] res_container_static = resource_container_env.StaticLibrary('rcs_container', res_container_src) res_container_shared = resource_container_env.SharedLibrary('rcs_container', res_container_src) resource_container_env.InstallTarget([res_container_static,res_container_shared], 'libResContainer') +resource_container_env.UserInstallTargetLib([res_container_static,res_container_shared], 'libResContainer') resource_container_env.UserInstallTargetHeader('include/RCSBundleInfo.h', 'service/resource-container', 'RCSBundleInfo.h') resource_container_env.UserInstallTargetHeader('include/RCSResourceContainer.h', 'service/resource-container', 'RCSResourceContainer.h') @@ -144,8 +154,9 @@ if target_os in ['linux', 'tizen', 'android']: DISensorBundle = DI_sensor_bundle_env.SharedLibrary('DISensorBundle', DI_sensor_bundle_src) DI_sensor_bundle_env.InstallTarget(DISensorBundle, 'libDISensorBundle') + DI_sensor_bundle_env.UserInstallTargetLib(DISensorBundle, 'libDISensorBundle') - if target_os == 'linux' : + if target_os in ['linux']: SConscript(DI_SENSOR_BUNDLE_DIR + 'src/inputSensors/SConscript') Command("THSensorApp", DI_SENSOR_BUNDLE_DIR + "src/inputSensors/THSensorApp/THSensorApp", Copy("$TARGET", "$SOURCE")) Command("THSensorApp1", DI_SENSOR_BUNDLE_DIR + "src/inputSensors/THSensorApp1/THSensorApp1", Copy("$TARGET", "$SOURCE")) @@ -166,8 +177,9 @@ if target_os in ['linux', 'tizen', 'android']: BMISensorBundle = BMI_sensor_bundle_env.SharedLibrary('BMISensorBundle', BMI_sensor_bundle_src) BMI_sensor_bundle_env.InstallTarget(BMISensorBundle, 'libBMISensorBundle') + BMI_sensor_bundle_env.UserInstallTargetLib(BMISensorBundle, 'libBMISensorBundle') - if target_os == 'linux' : + if target_os in ['linux']: SConscript(BMI_SENSOR_BUNDLE_DIR + 'src/inputSensors/SConscript') Command("HeightSensorApp", BMI_SENSOR_BUNDLE_DIR + "src/inputSensors/HeightSensorApp/HeightSensorApp", Copy("$TARGET", "$SOURCE")) Command("WeightSensorApp", BMI_SENSOR_BUNDLE_DIR + "src/inputSensors/WeightSensorApp/WeightSensorApp", Copy("$TARGET", "$SOURCE")) @@ -204,12 +216,13 @@ else: HueBundle = hue_resource_bundle_env.SharedLibrary('HueBundle', hue_resource_bundle_src) hue_resource_bundle_env.InstallTarget(HueBundle, 'libHueBundle') + hue_resource_bundle_env.UserInstallTargetLib(HueBundle, 'libHueBundle') lib_env = conf2.Finish() ###################################################################### # build resource container unit tests ###################################################################### -if target_os == 'linux': +if target_os in ['linux']: SConscript('unittests/SConscript') ###################################################################### @@ -244,4 +257,4 @@ env.AppendTarget('containersampleclient') # Build Container Java SDK ###################################################################### if target_os == 'android': - SConscript('android/SConscript') \ No newline at end of file + SConscript('android/SConscript')