riscv64: Add support for RISC-V
[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_proxy = env.get('WITH_PROXY')
17 with_tcp = env.get('WITH_TCP')
18 with_mq = env.get('WITH_MQ')
19 disable_ble_server = env.get('DISABLE_BLE_SERVER')
20
21 with_upstream_libcoap = env.get('WITH_UPSTREAM_LIBCOAP')
22 if with_upstream_libcoap == '1':
23         # For bring up purposes only, we manually copy the forked version to where the unforked version is downloaded.
24         env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
25 else:
26         # For bring up purposes only, the forked version will live here.
27         env.AppendUnique(CPPPATH = ['../../../../connectivity/lib/libcoap-4.1.1'])
28
29 env.PrependUnique(CPPPATH = [
30                 '../../../../logger/include',
31                 '../../../../stack/include',
32                 '../../../../../../extlibs/cjson',
33                 '../../../../../oc_logger/include'
34                 ])
35
36 env.AppendUnique(CPPDEFINES = ['TB_LOG'])
37 if routing == 'GW':
38         env.AppendUnique(CPPDEFINES = ['ROUTING_GATEWAY'])
39 elif routing == 'EP':
40         env.AppendUnique(CPPDEFINES = ['ROUTING_EP'])
41 env.AppendUnique(CPPDEFINES = ['__TIZEN__'])
42
43 if env.get('WITH_PROXY'):
44         env.AppendUnique(CPPDEFINES = ['WITH_CHPROXY'])
45
46 print "Given Transport is %s" % transport
47 print "Given OS is %s" % target_os
48 print "Given MQ is %s" % with_mq
49
50 gbs_command_prefix = ""
51 if (('BLE' in transport) or ('ALL' in transport)):
52         print "Tizen BLE requires tizen 3.0 profile"
53         gbs_command_prefix += "gbsprofile=tizen_4_0_unified_armv7l "
54
55 if target_os == 'tizen':
56         command = gbs_command_prefix + "./resource/csdk/stack/samples/tizen/build/gbsbuild.sh %s %s %s %s %s %s %s %s %s %s" % (transport, secured, buildsample, release_mode, logging, routing, with_tcp, with_proxy, with_mq, disable_ble_server)
57         print "Created Command is %s" % command
58         gbs_script = env.Command('gbs_build', None, command)
59         AlwaysBuild ('gbs_script')