2013-04-21 22:22:12 +02:00
|
|
|
#!/usr/bin/python
|
2015-05-08 22:40:35 +02:00
|
|
|
import lutin.module as module
|
|
|
|
import lutin.tools as tools
|
2013-04-21 22:22:12 +02:00
|
|
|
|
2015-10-14 21:21:03 +02:00
|
|
|
|
|
|
|
def get_type():
|
|
|
|
return "LIBRARY"
|
|
|
|
|
2013-12-23 22:38:46 +01:00
|
|
|
def get_desc():
|
2015-10-14 21:21:03 +02:00
|
|
|
return "Ewol tool kit"
|
|
|
|
|
|
|
|
def get_licence():
|
|
|
|
return "APACHE-2"
|
|
|
|
|
|
|
|
def get_compagny_type():
|
|
|
|
return "com"
|
2013-12-23 22:38:46 +01:00
|
|
|
|
2015-10-14 21:21:03 +02:00
|
|
|
def get_compagny_name():
|
|
|
|
return "atria-soft"
|
2013-12-23 22:38:46 +01:00
|
|
|
|
2015-10-14 21:21:03 +02:00
|
|
|
def get_maintainer():
|
|
|
|
return ["Mr DUPIN Edouard <yui.heero@gmail.com>"]
|
|
|
|
|
|
|
|
def get_version():
|
2015-12-04 21:08:02 +01:00
|
|
|
return [0,9,"dev"]
|
2015-10-14 21:21:03 +02:00
|
|
|
|
|
|
|
def create(target, module_name):
|
|
|
|
my_module = module.Module(__file__, module_name, get_type())
|
2015-09-24 21:44:04 +02:00
|
|
|
my_module.add_extra_compile_flags()
|
2013-04-21 22:22:12 +02:00
|
|
|
# add the file to compile:
|
2015-09-24 21:44:04 +02:00
|
|
|
my_module.add_src_file([
|
2013-10-25 20:47:46 +02:00
|
|
|
'etk/debug.cpp',
|
2015-03-22 14:54:18 +01:00
|
|
|
'etk/etk.cpp',
|
2013-12-28 09:27:29 +01:00
|
|
|
'etk/stdTools.cpp',
|
2014-04-30 22:18:00 +02:00
|
|
|
'etk/log.cpp',
|
2013-04-21 22:22:12 +02:00
|
|
|
'etk/tool.cpp',
|
2013-07-08 09:58:15 +02:00
|
|
|
'etk/Noise.cpp',
|
|
|
|
'etk/Color.cpp',
|
2015-03-20 21:07:58 +01:00
|
|
|
'etk/thread/tools.cpp',
|
2015-11-17 21:22:28 +01:00
|
|
|
'etk/math/Matrix2.cpp',
|
2013-04-21 22:22:12 +02:00
|
|
|
'etk/math/Matrix4.cpp',
|
|
|
|
'etk/math/Vector2D.cpp',
|
2013-07-08 09:58:15 +02:00
|
|
|
'etk/math/Vector3D.cpp',
|
2013-08-09 21:22:42 +02:00
|
|
|
'etk/math/Vector4D.cpp',
|
2013-04-21 22:22:12 +02:00
|
|
|
'etk/os/FSNode.cpp',
|
|
|
|
'etk/os/FSNodeRight.cpp',
|
2013-07-24 07:42:25 +02:00
|
|
|
'etk/archive/Archive.cpp',
|
|
|
|
'etk/archive/Zip.cpp'])
|
2013-04-21 22:22:12 +02:00
|
|
|
|
2014-04-17 01:28:21 +02:00
|
|
|
if target.name=="IOs":
|
2015-09-24 21:44:04 +02:00
|
|
|
my_module.add_src_file('etk/logIOs.m')
|
2015-02-24 22:20:11 +01:00
|
|
|
|
2015-09-24 21:44:04 +02:00
|
|
|
my_module.add_header_file([
|
2015-09-14 21:11:04 +02:00
|
|
|
'etk/etk.h',
|
|
|
|
'etk/types.h',
|
|
|
|
'etk/stdTools.h',
|
|
|
|
'etk/log.h',
|
|
|
|
'etk/tool.h',
|
|
|
|
'etk/Noise.h',
|
|
|
|
'etk/Color.h',
|
|
|
|
'etk/Hash.h',
|
|
|
|
'etk/thread/tools.h',
|
2015-11-17 21:22:28 +01:00
|
|
|
'etk/math/Matrix2.h',
|
2015-09-14 21:11:04 +02:00
|
|
|
'etk/math/Matrix4.h',
|
|
|
|
'etk/math/Vector2D.h',
|
|
|
|
'etk/math/Vector3D.h',
|
|
|
|
'etk/math/Vector4D.h',
|
|
|
|
'etk/os/Fifo.h',
|
|
|
|
'etk/os/FSNode.h',
|
|
|
|
'etk/os/FSNodeRight.h',
|
|
|
|
'etk/archive/Archive.h',
|
|
|
|
'etk/archive/Zip.h'])
|
2013-07-24 07:42:25 +02:00
|
|
|
|
2014-09-16 21:09:25 +02:00
|
|
|
if target.config["mode"] == "release":
|
2013-04-23 22:24:54 +02:00
|
|
|
# TODO : The other way is to remove this ...
|
|
|
|
# TODO : Fore release mode : the etk folder are absolutly not at the same position in the tree ...
|
2015-09-24 21:44:04 +02:00
|
|
|
my_module.compile_flags('c', "-DMODE_RELEASE")
|
2013-04-24 12:51:17 +02:00
|
|
|
else:
|
2015-09-24 21:44:04 +02:00
|
|
|
my_module.add_export_flag('c', "-DDEBUG_LEVEL=3")
|
|
|
|
my_module.add_export_flag('c', "-DDEBUG=1")
|
2013-05-16 21:24:27 +02:00
|
|
|
# Bor backtrace display :
|
2015-10-15 22:46:16 +02:00
|
|
|
if target.name != "Windows" \
|
|
|
|
and target.name != "MacOs" \
|
|
|
|
and target.name != "IOs":
|
|
|
|
my_module.add_export_flag('link', [
|
|
|
|
'-ldl',
|
|
|
|
'-rdynamic'])
|
|
|
|
elif target.name != "Windows":
|
|
|
|
my_module.add_export_flag('link', [
|
|
|
|
'-ldl'])
|
2013-04-21 22:22:12 +02:00
|
|
|
|
2015-10-14 21:21:03 +02:00
|
|
|
my_module.compile_version("c++", 2011)
|
2015-09-24 21:44:04 +02:00
|
|
|
my_module.add_optionnal_module_depend('minizip', ["c++", "-DETK_BUILD_MINIZIP"])
|
|
|
|
my_module.add_optionnal_module_depend('linearmath', ["c", "-DETK_BUILD_LINEARMATH"], export=True)
|
2015-02-20 21:40:03 +01:00
|
|
|
|
2013-05-08 12:19:19 +02:00
|
|
|
if target.name=="Windows":
|
2015-04-22 23:59:53 +02:00
|
|
|
pass
|
2013-05-29 21:31:08 +02:00
|
|
|
elif target.name=="Android":
|
2015-12-02 21:48:12 +01:00
|
|
|
#my_module.add_module_depend("SDK")
|
2015-04-22 23:59:53 +02:00
|
|
|
pass
|
2013-05-08 12:19:19 +02:00
|
|
|
else:
|
2015-09-24 21:44:04 +02:00
|
|
|
my_module.add_export_flag('link', "-lpthread")
|
2013-05-08 12:19:19 +02:00
|
|
|
|
2015-09-24 21:44:04 +02:00
|
|
|
my_module.add_path(tools.get_current_path(__file__))
|
|
|
|
return my_module
|
2013-04-21 22:22:12 +02:00
|
|
|
|
|
|
|
|