etk/lutin_etk.py

85 lines
2.1 KiB
Python
Raw Normal View History

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
2013-12-23 22:38:46 +01:00
def get_desc():
return "e-tk : Ewol tool kit"
def create(target):
2013-04-21 22:22:12 +02:00
# module name is 'edn' and type binary.
2013-12-23 22:38:46 +01:00
myModule = module.Module(__file__, 'etk', 'LIBRARY')
# add extra compilation flags :
myModule.add_extra_compile_flags()
2013-04-21 22:22:12 +02:00
# add the file to compile:
2013-12-23 22:38:46 +01:00
myModule.add_src_file([
2013-10-25 20:47:46 +02:00
'etk/debug.cpp',
'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',
'etk/Noise.cpp',
'etk/Color.cpp',
'etk/thread/tools.cpp',
2013-04-21 22:22:12 +02:00
'etk/math/Matrix4.cpp',
'etk/math/Vector2D.cpp',
'etk/math/Vector3D.cpp',
'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":
2014-04-30 22:18:00 +02:00
myModule.add_src_file('etk/logIOs.m')
2015-02-24 22:20:11 +01:00
myModule.add_header_file([
'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',
'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":
# 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-05-08 22:40:35 +02:00
myModule.compile_flags('c', "-DMODE_RELEASE")
else:
2015-05-08 22:40:35 +02:00
myModule.add_export_flag('c', "-DDEBUG_LEVEL=3")
myModule.add_export_flag('c', "-DDEBUG=1")
# Bor backtrace display :
2014-09-16 21:09:25 +02:00
if target.name != "Windows":
2015-05-08 22:40:35 +02:00
myModule.add_export_flag('link', "-ldl -rdynamic")
2013-04-21 22:22:12 +02:00
myModule.compile_version_XX(2011)
# name of the dependency
myModule.add_optionnal_module_depend('minizip', ["c++", "-DETK_BUILD_MINIZIP"])
myModule.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":
pass
elif target.name=="Android":
pass
2013-05-08 12:19:19 +02:00
else:
2015-05-08 22:40:35 +02:00
myModule.add_export_flag('link', "-lpthread")
2013-05-08 12:19:19 +02:00
myModule.add_path(tools.get_current_path(__file__))
2013-04-21 22:22:12 +02:00
# add the currrent module at the
return myModule