Merge "Merge branch 'master' into notification-service" into notification-service
[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 with_tcp = env.get('WITH_TCP')
17
18 env.PrependUnique(CPPPATH = [
19                 '../../../../logger/include',
20                 '../../../../stack/include',
21                 '../../../../../../extlibs/cjson',
22                 '../../../../../oc_logger/include',
23                 '../../../../../connectivity/lib/libcoap-4.1.1'
24                 ])
25
26 env.AppendUnique(CPPDEFINES = ['TB_LOG'])
27 if routing == 'GW':
28         env.AppendUnique(CPPDEFINES = ['ROUTING_GATEWAY'])
29 elif routing == 'EP':
30         env.AppendUnique(CPPDEFINES = ['ROUTING_EP'])
31 env.AppendUnique(CPPDEFINES = ['__TIZEN__'])
32
33 print "Given Transport is %s" % transport
34 print "Given OS is %s" % target_os
35
36 if target_os == 'tizen':
37         command = "sh resource/csdk/stack/samples/tizen/build/gbsbuild.sh %s %s %s %s %s %s %s" % (transport, secured, buildsample, release_mode, logging, routing, with_tcp)
38         print "Created Command is %s" % command
39         gbs_script = env.Command('gbs_build', None, command)
40         AlwaysBuild ('gbs_script')