#ifndef IOTIVITY_CONFIG_H__
#define IOTIVITY_CONFIG_H__
-#include "platform_features.h"
-
''' % (str(target_os), str(target_arch), str(datetime.datetime.utcnow()))
config_h_body = ''
config_h_footer = '''
+#include "platform_features.h"
+
#endif // IOTIVITY_CONFIG_H__
'''
# Detection of headers on the Arduino platform is currently broken.
cxx_headers = []
+if target_os in ['tizenrt']:
+ env.AppendUnique(CCFLAGS = ['-std=c99'])
+ env.AppendUnique(CCFLAGS = ['-w'])
+ cxx_headers.remove('sys/timeb.h')
+ config_h_body += "#include <tinyara/config.h>\n\n"
+
if target_os == 'msys_nt':
# WinPThread provides a pthread.h, but we want to use native threads.
cxx_headers.remove('pthread.h')
return "HAVE_" + header_file_converted
for header_file_name in cxx_headers:
- if conf.CheckCXXHeader(header_file_name):
- config_h_body += "#define %s 1\n\n" % get_define_from_header_file(header_file_name)
+ if target_os == 'tizenrt':
+ if conf.CheckCHeader(header_file_name):
+ config_h_body += "#define %s 1\n\n" % get_define_from_header_file(header_file_name)
+ else:
+ if conf.CheckCXXHeader(header_file_name):
+ config_h_body += "#define %s 1\n\n" % get_define_from_header_file(header_file_name)
conf.Finish()
# Autoconf feature doesn't work with Jenkins' arduino toolchain, so hardcode it here.
os.path.join(Dir('.').abspath, 'oic_malloc', 'include'),
os.path.join(Dir('.').abspath, 'oic_string', 'include'),
os.path.join(Dir('.').abspath, 'oic_time', 'include'),
- os.path.join(Dir('.').abspath, 'ocrandom', 'include')
+ os.path.join(Dir('.').abspath, 'ocrandom', 'include'),
+ os.path.join(Dir('.').abspath, 'octhread', 'include')
])
if target_os == 'tizen':
common_env = env.Clone()
######################################################################
-# Build flags
-######################################################################
-common_conf = Configure(common_env)
-if common_conf.CheckFunc('QueryPerformanceFrequency'):
- common_env.AppendUnique(CPPDEFINES = ['HAVE_QUERYPERFORMANCEFREQUENCY'])
-common_env = common_conf.Finish()
-
-######################################################################
# Source files and Targets
######################################################################
common_src = [
'oic_string/src/oic_string.c',
'oic_malloc/src/oic_malloc.c',
'oic_time/src/oic_time.c',
- 'ocrandom/src/ocrandom.c',
+ 'ocrandom/src/ocrandom.c'
]
+
+if env['POSIX_SUPPORTED']:
+ common_src.append('octhread/src/posix/octhread.c')
+elif target_os in ['windows']:
+ common_src.append('octhread/src/windows/octhread.c')
+else:
+ common_src.append('octhread/src/noop/octhread.c')
+
commonlib = common_env.StaticLibrary('c_common', common_src)
common_env.InstallTarget(commonlib, 'c_common')
common_env.UserInstallTargetLib(commonlib, 'c_common')