import platform
Import('env')
-if env.get('RELEASE'):
- env.AppendUnique(CCFLAGS=['-Os'])
- env.AppendUnique(CPPDEFINES=['NDEBUG'])
-else:
- env.AppendUnique(CCFLAGS=['-g'])
-
-if env.get('LOGGING'):
- env.AppendUnique(CPPDEFINES=['TB_LOG'])
-
lib_env = env.Clone()
SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
notification_env = lib_env.Clone()
+if notification_env.get('RELEASE'):
+ notification_env.AppendUnique(CCFLAGS=['-Os'])
+else:
+ notification_env.AppendUnique(CCFLAGS=['-g'])
+
target_os = env.get('TARGET_OS')
######################################################################
# Build flags
######################################################################
-
notification_env.AppendUnique(CPPPATH=[
'include',
'src/common',
'src/provider',
'src/consumer',
+ '#/resource/c_common',
+ '#/resource/c_common/oic_malloc/include',
+ '#/resource/c_common/oic_string/include',
+ '#/resource/c_common/oic_time/include',
'#/resource/csdk/include',
'#/resource/csdk/security/include',
'#/resource/csdk/stack/include',
'oc_logger',
'connectivity_abstraction',
'libcoap',
- 'resource_directory'
+ 'resource_directory',
])
if target_os not in ['windows', 'winrt']:
if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
notification_env.AppendUnique(LINKFLAGS=['-Wl,--no-undefined'])
-if target_os == 'linux':
- notification_env.AppendUnique(LIBS=['pthread'])
- if not env.get('RELEASE'):
- notification_env.PrependUnique(LIBS=['gcov'])
- notification_env.AppendUnique(CCFLAGS=['--coverage'])
+notification_env.AddPthreadIfNeeded()
+
+if (target_os == 'linux') and (not env.get('RELEASE')):
+ notification_env.PrependUnique(LIBS=['gcov'])
+ notification_env.AppendUnique(CCFLAGS=['--coverage'])
if target_os == 'android':
notification_env.AppendUnique(CCFLAGS=['-frtti', '-fexceptions'])
if not env.get('RELEASE'):
notification_env.AppendUnique(LIBS=['log'])
-if target_os == 'tizen':
- notification_env.AppendUnique(CPPDEFINES=['__TIZEN__'])
- # notification_env.ParseConfig('pkg-config --cflags --libs sqlite3')
-
-if env.get('WITH_CLOUD') == True:
- notification_env.AppendUnique(CPPDEFINES=['WITH_CLOUD'])
-
-if env.get('SECURED') == '1':
- notification_env.AppendUnique(CPPDEFINES=['SECURED'])
-
-with_mq = env.get('WITH_MQ')
-if 'SUB' in with_mq:
- notification_env.AppendUnique(CPPDEFINES=['MQ_SUBSCRIBER', 'WITH_MQ'])
- print "MQ SUB support"
-
-if 'PUB' in with_mq:
- notification_env.AppendUnique(CPPDEFINES=['MQ_PUBLISHER', 'WITH_MQ'])
- print "MQ PUB support"
-
-if 'BROKER' in with_mq:
- notification_env.AppendUnique(CPPDEFINES=['MQ_BROKER', 'WITH_MQ'])
- print "MQ Broker support"
-
######################################################################
# Source files and Targets
######################################################################
import platform
Import('env')
-if env.get('RELEASE'):
- env.AppendUnique(CCFLAGS=['-Os'])
- env.AppendUnique(CPPDEFINES=['NDEBUG'])
-else:
- env.AppendUnique(CCFLAGS=['-g'])
-
-if env.get('LOGGING'):
- env.AppendUnique(CPPDEFINES=['TB_LOG'])
-
lib_env = env.Clone()
SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
notification_env = lib_env.Clone()
target_os = env.get('TARGET_OS')
+if notification_env.get('RELEASE'):
+ notification_env.AppendUnique(CCFLAGS=['-Os'])
+else:
+ notification_env.AppendUnique(CCFLAGS=['-g'])
+
######################################################################
# Build flags
######################################################################
'../common',
'../provider/inc',
'../../src/common',
+ '#/resource/c_common',
+ '#/resource/c_common/oic_malloc/include',
+ '#/resource/c_common/oic_string/include',
'#/resource/csdk/security/include',
'#/resource/csdk/include',
'#/resource/csdk/stack/include',
'#/resource/include',
- '#/resource/oc_logger/include'
+ '#/resource/oc_logger/include',
])
notification_env.PrependUnique(LIBS=[
'oc_logger',
'oc',
'notification_consumer',
+ 'logger',
])
notification_env.AppendUnique(CXXFLAGS=['-std=c++0x', '-frtti'])
notification_env.PrependUnique(LIBS=['gcov'])
notification_env.AppendUnique(CCFLAGS=['--coverage'])
-if env.get('WITH_CLOUD') == True:
- notification_env.AppendUnique(CPPDEFINES=['WITH_CLOUD'])
-
-with_mq = env.get('WITH_MQ')
-if 'SUB' in with_mq:
- notification_env.AppendUnique(CPPDEFINES=['MQ_SUBSCRIBER', 'WITH_MQ'])
- print "MQ SUB support"
-
-if 'PUB' in with_mq:
- notification_env.AppendUnique(CPPDEFINES=['MQ_PUBLISHER', 'WITH_MQ'])
- print "MQ PUB support"
+if target_os in ['linux', 'tizen']:
+ notification_env.AppendUnique(LIBS=['rt'])
-if 'BROKER' in with_mq:
- notification_env.AppendUnique(CPPDEFINES=['MQ_BROKER', 'WITH_MQ'])
- print "MQ Broker support"
######################################################################
# Source files and Targets for Consumer
######################################################################
'../../../../extlibs/boost/boost_1_58_0',
'../../../../java/jni',
'../../android/notification-service/src/main/jni/common',
- '../../android/notification-service/src/main/jni/consumer'
+ '../../android/notification-service/src/main/jni/consumer',
])
notification_jni_consumer_env.PrependUnique(
'../../provider/inc',
'../../consumer/inc',
'../../common',
+ '#/resource/c_common',
+ '#/resource/c_common/oic_malloc/include',
+ '#/resource/c_common/oic_string/include',
'#/resource/csdk/include',
'#/resource/csdk/stack/include',
'#/resource/csdk/connectivity/api',
notification_sample_env.PrependUnique(LIBS=['gcov'])
notification_sample_env.AppendUnique(CCFLAGS=['--coverage'])
-if env.get('WITH_CLOUD') == True:
- notification_sample_env.AppendUnique(CPPDEFINES=['WITH_CLOUD'])
-with_mq = env.get('WITH_MQ')
-if 'SUB' in with_mq:
- notification_sample_env.AppendUnique(
- CPPDEFINES=['MQ_SUBSCRIBER', 'WITH_MQ'])
- print "MQ SUB support"
-
-if 'PUB' in with_mq:
- notification_sample_env.AppendUnique(
- CPPDEFINES=['MQ_PUBLISHER', 'WITH_MQ'])
- print "MQ PUB support"
-
-if 'BROKER' in with_mq:
- notification_sample_env.AppendUnique(CPPDEFINES=['MQ_BROKER', 'WITH_MQ'])
- print "MQ Broker support"
-if env.get('WITH_TCP') == True:
- notification_sample_env.AppendUnique(CPPDEFINES=['WITH_TCP'])
if env.get('SECURED') == '1':
notification_sample_env.AppendUnique(
LIBS=['mbedtls', 'mbedx509', 'mbedcrypto'])
+if target_os in ['linux', 'tizen']:
+ notification_sample_env.AppendUnique(LIBS=['rt'])
####################################################################
# Source files and Targets
import platform
Import('env')
-if env.get('RELEASE'):
- env.AppendUnique(CCFLAGS=['-Os'])
- env.AppendUnique(CPPDEFINES=['NDEBUG'])
-else:
- env.AppendUnique(CCFLAGS=['-g'])
-
-if env.get('LOGGING'):
- env.AppendUnique(CPPDEFINES=['TB_LOG'])
-
lib_env = env.Clone()
SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
notification_env = lib_env.Clone()
target_os = env.get('TARGET_OS')
+if notification_env.get('RELEASE'):
+ notification_env.AppendUnique(CCFLAGS=['-Os'])
+else:
+ notification_env.AppendUnique(CCFLAGS=['-g'])
+
+
######################################################################
# Build flags
######################################################################
'../common',
'../consumer/inc',
'../../src/common',
+ '#/resource/c_common',
+ '#/resource/c_common/oic_malloc/include',
+ '#/resource/c_common/oic_string/include',
'#/resource/csdk/security/include',
'#/resource/csdk/include',
'#/resource/csdk/stack/include',
'oc',
'octbstack',
'notification_provider',
- 'resource_directory'
+ 'resource_directory',
+ 'logger'
])
notification_env.AppendUnique(CXXFLAGS=['-std=c++0x', '-frtti'])
notification_env.PrependUnique(LIBS=['gcov'])
notification_env.AppendUnique(CCFLAGS=['--coverage'])
-if env.get('WITH_CLOUD') == True:
- notification_env.AppendUnique(CPPDEFINES=['WITH_CLOUD'])
-
-with_mq = env.get('WITH_MQ')
-if 'SUB' in with_mq:
- notification_env.AppendUnique(CPPDEFINES=['MQ_SUBSCRIBER', 'WITH_MQ'])
- print "MQ SUB support"
-
-if 'PUB' in with_mq:
- notification_env.AppendUnique(CPPDEFINES=['MQ_PUBLISHER', 'WITH_MQ'])
- print "MQ PUB support"
+if target_os in ['linux', 'tizen']:
+ notification_env.AppendUnique(LIBS=['rt'])
-if 'BROKER' in with_mq:
- notification_env.AppendUnique(CPPDEFINES=['MQ_BROKER', 'WITH_MQ'])
- print "MQ Broker support"
######################################################################
# Source files and Targets for Provider
######################################################################
'../../include',
'../../src/common',
'../../src/provider',
+ '#/resource/c_common',
+ '#/resource/c_common/oic_malloc/include',
+ '#/resource/c_common/oic_string/include',
'#/resource/csdk/include',
'#/resource/csdk/stack/include',
'#/resource/csdk/security/include',
if env.get('WITH_CLOUD') == True:
notification_sample_env.AppendUnique(CPPPATH=['../../src/consumer'])
notification_sample_env.AppendUnique(CPPPATH=['../../src/provider'])
- notification_sample_env.AppendUnique(CPPDEFINES=['WITH_CLOUD'])
providerCloudConnectorObj = notification_sample_env.Object('cloud_connector.c')
consumerCloudConnectorObj = notification_sample_env.Object('cloud_connector.c')
consumerCloudConnectorObj,
]
-if env.get('WITH_TCP') == True:
- notification_sample_env.AppendUnique(CPPDEFINES=['WITH_TCP'])
if env.get('SECURED') == '1':
notification_sample_env.AppendUnique(
LIBS=['mbedtls', 'mbedx509', 'mbedcrypto'])
-with_mq = env.get('WITH_MQ')
-if 'SUB' in with_mq:
- notification_sample_env.AppendUnique(
- CPPDEFINES=['MQ_SUBSCRIBER', 'WITH_MQ'])
- print "MQ SUB support"
-
-if 'PUB' in with_mq:
- notification_sample_env.AppendUnique(
- CPPDEFINES=['MQ_PUBLISHER', 'WITH_MQ'])
- print "MQ PUB support"
-if 'BROKER' in with_mq:
- notification_sample_env.AppendUnique(CPPDEFINES=['MQ_BROKER', 'WITH_MQ'])
- print "MQ Broker support"
####################################################################
# Source files and Targets