1 #******************************************************************
3 # Copyright 2015 Samsung Electronics All Rights Reserved.
5 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
28 SConscript('modules/common/SConscript')
29 #SConscript('modules/resourceBroker/SConscript')
30 #SConscript('modules/resourceCache/SConscript')
31 SConscript('modules/serverBuilder/SConscript')
32 SConscript('modules/resourceContainer/SConscript')
33 #SConscript('sdk/SConscript')
35 ######################################################################
36 #building Resource client
37 ######################################################################
39 if env.get('RELEASE'):
40 env.AppendUnique(CCFLAGS = ['-Os'])
41 env.AppendUnique(CPPDEFINES = ['NDEBUG'])
43 env.AppendUnique(CCFLAGS = ['-g'])
45 if env.get('LOGGING'):
46 env.AppendUnique(CPPDEFINES = ['TB_LOG'])
48 # Add third party libraries
50 SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
52 resourceClient_env = lib_env.Clone()
53 target_os = env.get('TARGET_OS')
54 ######################################################################
56 ######################################################################
57 resourceClient_env.AppendUnique(CPPPATH = ['include'])
58 resourceClient_env.AppendUnique(CPPPATH = ['modules/common/primitiveResource/include'])
59 resourceClient_env.AppendUnique(CPPPATH = ['modules/common/expiryTimer/include'])
60 resourceClient_env.AppendUnique(CPPPATH = ['modules/resourceBroker/include'])
61 resourceClient_env.AppendUnique(CPPPATH = ['modules/resourceCache/include'])
64 resourceClient_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
66 resourceClient_env.PrependUnique(LIBS = ['oc', 'ResourceBroker' , 'ResourceCache', 'service_common', 'octbstack', 'gnustl_shared','oc_logger', 'compatibility', 'log'])
69 if target_os not in ['windows', 'winrt']:
70 resourceClient_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])
71 if target_os == 'linux':
72 resourceClient_env.AppendUnique(LIBS = ['pthread'])
74 ######################################################################
75 # Source files and Targets
76 ######################################################################
77 resourceClient_src = 'src/'
79 resourceClient_src+ 'ResourceClient.cpp']
80 ResourceClientsdk = resourceClient_env.StaticLibrary('ResourceClient', client_src)
82 resourceClient_env.InstallTarget(ResourceClientsdk , 'libResourceClient')
84 #Go to build sample apps
85 SConscript('examples/SConscript')