# -*- mode: python; python-indent-offset: 4; indent-tabs-mode: nil -*- ## # 'resource' sub-project main build script # ## Import('env') target_os = env.get('TARGET_OS') transport = env.get('TARGET_TRANSPORT') with_mq = env.get('WITH_MQ') disable_ble_server = env.get('DISABLE_BLE_SERVER') print("Given Transport is %s" % transport) if env.get('RELEASE'): env.AppendUnique(CFLAGS = ['-std=c99', '-fPIC', '-D__TIZEN__','-DWITH_POSIX', '-Wall','-D_GNU_SOURCE','-DTIZEN_DEBUG_ENABLE']) else: env.AppendUnique(CFLAGS = ['-std=c99', '-fPIC', '-D__TIZEN__','-DWITH_POSIX', '-Wall', '-DSLP_SDK_LOG', '-g','-D_GNU_SOURCE','-DTIZEN_DEBUG_ENABLE']) if env.get('LOGGING'): env.AppendUnique(CPPDEFINES = ['TB_LOG']) env.ParseConfig("pkg-config --cflags --libs capi-network-connection dlog glib-2.0") if env.get('OIC_SUPPORT_TIZEN_TRACE') == 'True': env.ParseConfig("pkg-config --cflags --libs ttrace") env.AppendUnique(CPPDEFINES = ['OIC_SUPPORT_TIZEN_TRACE']) if 'ALL' in transport: env.AppendUnique(CPPDEFINES = ['WIFI_ADAPTER', 'NO_ETHERNET_ADAPTER','EDR_ADAPTER','LE_ADAPTER']) print("CA Transport is ALL") if env.get('DISABLE_BLE_SERVER'): env.AppendUnique(CPPDEFINES = ['DISABLE_BLE_SERVER']) print("BLE Server Disabled") else: if 'BT' in transport: env.AppendUnique(CPPDEFINES = ['EDR_ADAPTER']) print("CA Transport is BT") else: env.AppendUnique(CPPDEFINES = ['NO_EDR_ADAPTER']) if 'BLE' in transport: env.AppendUnique(CPPDEFINES = ['LE_ADAPTER']) print("CA Transport is BLE") if env.get('DISABLE_BLE_SERVER'): env.AppendUnique(CPPDEFINES = ['DISABLE_BLE_SERVER']) print("BLE Server Disabled") else: env.AppendUnique(CPPDEFINES = ['NO_LE_ADAPTER']) if 'IP' in transport: env.AppendUnique(CPPDEFINES = ['WIFI_ADAPTER']) print("CA Transport is WIFI") else: env.AppendUnique(CPPDEFINES = ['NO_WIFI_ADAPTER']) if env.get('WITH_TCP'): env.AppendUnique(CPPDEFINES = ['TCP_ADAPTER', 'WITH_TCP']) else: env.AppendUnique(CPPDEFINES = ['NO_TCP_ADAPTER']) if env.get('DISABLE_TCP_SERVER'): env.AppendUnique(CPPDEFINES = ['DISABLE_TCP_SERVER']) if 'SUB' in with_mq: env.AppendUnique(CPPDEFINES = ['MQ_SUBSCRIBER', 'WITH_MQ']) print("MQ SUB support") if 'PUB' in with_mq: env.AppendUnique(CPPDEFINES = ['MQ_PUBLISHER', 'WITH_MQ']) print("MQ PUB support") if 'BROKER' in with_mq: env.AppendUnique(CPPDEFINES = ['MQ_BROKER', 'WITH_MQ']) print("MQ Broker support") env.SConscript(['../resource/SConscript'])