X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=service%2Fthings-manager%2FSConscript;h=da66dbf2a95a380801ac03ae8f92a724f0d8108d;hb=390866079e285d2c74918432c0d597d5da52f8a0;hp=412907ce10a8556837cb5f1325c782c9ccb1a273;hpb=00b3660e45c56cb3db35dc2596a054f801b5591a;p=platform%2Fupstream%2Fiotivity.git diff --git a/service/things-manager/SConscript b/service/things-manager/SConscript index 412907c..da66dbf 100644 --- a/service/things-manager/SConscript +++ b/service/things-manager/SConscript @@ -1,7 +1,27 @@ +#****************************************************************** +# +# Copyright 2014 Samsung Electronics All Rights Reserved. +# +#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + ## # things_manager project build script ## - +import os Import('env') # Add third party libraries @@ -13,23 +33,48 @@ target_os = env.get('TARGET_OS') ###################################################################### # Build flags ###################################################################### -things_manager_env.AppendUnique(CPPPATH = ['sdk/inc', 'sdk/src']) +things_manager_env.AppendUnique(CPPPATH = ['../../extlibs/timer', 'sdk/inc', 'sdk/src']) + +things_manager_env.PrependUnique(LIBS = ['oc', 'octbstack']) if target_os not in ['windows', 'winrt']: - things_manager_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall']) - if target_os != 'android': - things_manager_env.AppendUnique(CXXFLAGS = ['-pthread']) + things_manager_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall']) + if target_os != 'android': + things_manager_env.AppendUnique(CXXFLAGS = ['-pthread']) + things_manager_env.AppendUnique(LIBS = ['pthread']) + +if target_os not in ['darwin', 'ios', 'windows', 'winrt']: + things_manager_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined']) if target_os == 'android': - things_manager_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions']) + things_manager_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions']) + things_manager_env.PrependUnique(LIBS = ['gnustl_shared']) ###################################################################### # Source files and Targets ###################################################################### -tgm_src = env.Glob('sdk/src/*.cpp') -tgmsdk = things_manager_env.StaticLibrary('TGMSDKLibrary', tgm_src) -things_manager_env.InstallTarget(tgmsdk, 'libTGMSDK') +tgm_src = env.Glob('sdk/src/*.cpp', '../../extlibs/timer/timer.c') +tgmsdk_static = things_manager_env.StaticLibrary('TGMSDKLibrary', tgm_src) +tgmsdk_shared = things_manager_env.SharedLibrary('TGMSDKLibrary', tgm_src) + +things_manager_env.InstallTarget([tgmsdk_static,tgmsdk_shared], 'libTGMSDK') +things_manager_env.UserInstallTargetLib([tgmsdk_static,tgmsdk_shared], 'libTGMSDK') +things_manager_env.UserInstallTargetHeader('sdk/inc/ActionSet.h', 'service/things-manager', 'ActionSet.h') +things_manager_env.UserInstallTargetHeader('sdk/inc/GroupManager.h', 'service/things-manager', 'GroupManager.h') +things_manager_env.UserInstallTargetHeader('sdk/inc/ThingsConfiguration.h', 'service/things-manager', 'ThingsConfiguration.h') +things_manager_env.UserInstallTargetHeader('sdk/inc/ThingsMaintenance.h', 'service/things-manager', 'ThingsMaintenance.h') + +# Build JNI layer +#if target_os == 'android': +# SConscript(os.path.join('sdk', 'java', 'jni', 'SConscript')) #Go to build sample apps SConscript('sampleapp/SConscript') + +###################################################################### +# Build UnitTests Things Manager +################################################ ###################### +if target_os == 'linux': + SConscript('unittests/SConscript') +