ethread/lutin_ethread-tools.py

75 lines
1.5 KiB
Python
Raw Permalink Normal View History

2016-12-05 22:42:12 +01:00
#!/usr/bin/python
2019-05-03 10:18:22 +02:00
import realog.debug as debug
2016-12-05 22:42:12 +01:00
import lutin.tools as tools
def get_type():
return "LIBRARY"
def get_desc():
return "Ewol thread tools"
def get_licence():
return "MPL-2"
2016-12-05 22:42:12 +01:00
def get_compagny_type():
return "com"
def get_compagny_name():
return "atria-soft"
def get_maintainer():
return "authors.txt"
def get_version():
return "version.txt"
def configure(target, my_module):
my_module.add_extra_flags()
# add the file to compile:
my_module.add_src_file([
'ethread/tools.cpp',
])
my_module.add_header_file([
'ethread/tools.hpp',
2017-09-07 23:38:26 +02:00
'ethread/Thread.hpp',
'ethread/Mutex.hpp',
2017-09-14 00:59:21 +02:00
'ethread/MutexRecursive.hpp',
2017-09-07 23:38:26 +02:00
'ethread/Semaphore.hpp',
2016-12-05 22:42:12 +01:00
])
2017-09-07 23:38:26 +02:00
if "Windows" in target.get_type():
my_module.add_src_file([
'ethread/Mutex.Windows.cpp',
2017-09-14 00:59:21 +02:00
'ethread/MutexRecursive.Windows.cpp',
2017-09-07 23:38:26 +02:00
'ethread/Thread.Windows.cpp',
'ethread/Semaphore.Windows.cpp',
2017-09-07 23:38:26 +02:00
])
else:
my_module.add_src_file([
'ethread/Mutex.pthread.cpp',
2017-09-14 00:59:21 +02:00
'ethread/MutexRecursive.pthread.cpp',
2017-09-07 23:38:26 +02:00
'ethread/Thread.pthread.cpp',
'ethread/Semaphore.pthread.cpp',
2017-09-07 23:38:26 +02:00
])
my_module.add_depend([
'pthread',
])
2016-12-05 22:42:12 +01:00
# build in C++ mode
my_module.compile_version("c++", 2011)
# add dependency of the generic C++ library:
my_module.add_depend([
2018-09-07 23:51:16 +02:00
'etk-core',
2016-12-05 22:42:12 +01:00
])
#pthread is not availlable on Windows
if "Linux" in target.get_type() \
or "Android" in target.get_type():
my_module.add_depend([
'pthread'
])
return True