1 # -*- mode: python; python-indent-offset: 4; indent-tabs-mode: nil -*-
3 # 'resource' sub-project main build script
9 target_os = env.get('TARGET_OS')
10 transport = env.get('TARGET_TRANSPORT')
11 with_mq = env.get('WITH_MQ')
13 print "Given Transport is %s" % transport
15 if env.get('RELEASE'):
16 env.AppendUnique(CFLAGS = ['-std=c99', '-fPIC', '-D__TIZEN__','-DWITH_POSIX', '-Wall','-D_GNU_SOURCE','-DTIZEN_DEBUG_ENABLE'])
18 env.AppendUnique(CFLAGS = ['-std=c99', '-fPIC', '-D__TIZEN__','-DWITH_POSIX', '-Wall', '-DSLP_SDK_LOG', '-g','-D_GNU_SOURCE','-DTIZEN_DEBUG_ENABLE'])
20 if env.get('LOGGING'):
21 env.AppendUnique(CPPDEFINES = ['TB_LOG'])
23 env.ParseConfig("pkg-config --cflags --libs capi-network-wifi dlog glib-2.0")
24 if 'ALL' in transport:
25 env.AppendUnique(CPPDEFINES = ['WIFI_ADAPTER', 'NO_ETHERNET_ADAPTER','EDR_ADAPTER','LE_ADAPTER'])
26 print "CA Transport is ALL"
29 env.AppendUnique(CPPDEFINES = ['EDR_ADAPTER'])
30 print "CA Transport is BT"
32 env.AppendUnique(CPPDEFINES = ['NO_EDR_ADAPTER'])
34 if 'BLE' in transport:
35 env.AppendUnique(CPPDEFINES = ['LE_ADAPTER'])
36 print "CA Transport is BLE"
38 env.AppendUnique(CPPDEFINES = ['NO_LE_ADAPTER'])
41 env.AppendUnique(CPPDEFINES = ['WIFI_ADAPTER'])
42 print "CA Transport is WIFI"
44 env.AppendUnique(CPPDEFINES = ['NO_WIFI_ADAPTER'])
46 if env.get('WITH_TCP'):
47 env.AppendUnique(CPPDEFINES = ['TCP_ADAPTER', 'WITH_TCP'])
49 env.AppendUnique(CPPDEFINES = ['NO_TCP_ADAPTER'])
52 env.AppendUnique(CPPDEFINES = ['MQ_SUBSCRIBER', 'WITH_MQ'])
53 print "MQ SUB support"
56 env.AppendUnique(CPPDEFINES = ['MQ_PUBLISHER', 'WITH_MQ'])
57 print "MQ PUB support"
59 if 'BROKER' in with_mq:
60 env.AppendUnique(CPPDEFINES = ['MQ_BROKER', 'WITH_MQ'])
61 print "MQ Broker support"
63 env.SConscript(['../resource/SConscript'])