Merge branch 'master' into cloud-interface
[platform/upstream/iotivity.git] / resource / csdk / stack / samples / tizen / build / SConscript
1 ##
2 # CA build script
3 ##
4
5 SConscript('./resource/csdk/connectivity/build/SConscript')
6
7 Import('env')
8
9 target_os = env.get('TARGET_OS')
10 transport = env.get('TARGET_TRANSPORT')
11 buildsample = env.get('BUILD_SAMPLE')
12 release_mode = env.get('RELEASE')
13 secured = env.get('SECURED')
14 logging = env.get('LOGGING')
15 routing = env.get('ROUTING')
16
17 env.PrependUnique(CPPPATH = [
18                 '../../../../logger/include',
19                 '../../../../stack/include',
20                 '../../../../../../extlibs/cjson',
21                 '../../../../../oc_logger/include',
22                 '../../../../../connectivity/lib/libcoap-4.1.1'
23                 ])
24
25 env.AppendUnique(CPPDEFINES = ['TB_LOG'])
26 if routing == 'GW':
27         env.AppendUnique(CPPDEFINES = ['ROUTING_GATEWAY'])
28 elif routing == 'EP':
29         env.AppendUnique(CPPDEFINES = ['ROUTING_EP'])
30 env.AppendUnique(CPPDEFINES = ['__TIZEN__'])
31
32 print "Given Transport is %s" % transport
33 print "Given OS is %s" % target_os
34
35 if target_os == 'tizen':
36         command = "sh resource/csdk/stack/samples/tizen/build/gbsbuild.sh %s %s %s %s %s %s" % (transport, secured, buildsample, release_mode, logging, routing)
37         print "Created Command is %s" % command
38         gbs_script = env.Command('gbs_build', None, command)
39         AlwaysBuild ('gbs_script')