iotivity 0.9.0
[platform/upstream/iotivity.git] / service / things-manager / SConscript
1 ##
2 # things_manager project build script
3 ##
4
5 Import('env')
6
7 # Add third party libraries
8 lib_env = env.Clone()
9 SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', exports = 'lib_env')
10
11 things_manager_env = lib_env.Clone()
12 target_os = env.get('TARGET_OS')
13 ######################################################################
14 # Build flags
15 ######################################################################
16 things_manager_env.AppendUnique(CPPPATH = ['sdk/inc', 'sdk/src'])
17
18 if target_os not in ['windows', 'winrt']:
19         things_manager_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall'])
20         if target_os != 'android':
21                 things_manager_env.AppendUnique(CXXFLAGS = ['-pthread'])
22
23 if target_os == 'android':
24         things_manager_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
25
26 ######################################################################
27 # Source files and Targets
28 ######################################################################
29 tgm_src = env.Glob('sdk/src/*.cpp')
30 tgmsdk = things_manager_env.StaticLibrary('TGMSDKLibrary', tgm_src)
31
32 things_manager_env.InstallTarget(tgmsdk, 'libTGMSDK')
33
34 #Go to build sample apps
35 SConscript('sampleapp/SConscript')