2013-04-21 22:29:27 +02:00
|
|
|
#!/usr/bin/python
|
2013-12-23 22:38:46 +01:00
|
|
|
import lutinModule as module
|
|
|
|
import lutinTools as tools
|
2015-02-16 21:40:51 +01:00
|
|
|
import lutinDebug as debug
|
2013-04-22 21:21:36 +02:00
|
|
|
import os
|
2013-07-11 13:54:04 +02:00
|
|
|
import lutinMultiprocess
|
2013-04-21 22:29:27 +02:00
|
|
|
|
2013-12-23 22:38:46 +01:00
|
|
|
def get_desc():
|
|
|
|
return "ewol is a main library to use widget in the openGl environement and manage all the wraping os"
|
|
|
|
|
2014-11-25 22:07:48 +01:00
|
|
|
def get_license():
|
|
|
|
return "APACHE v2.0"
|
2013-12-23 22:38:46 +01:00
|
|
|
|
|
|
|
def create(target):
|
2013-04-23 22:52:06 +02:00
|
|
|
# set the ewol folder for Android basic sources ...
|
2013-12-23 22:38:46 +01:00
|
|
|
target.set_ewol_folder(tools.get_current_path(__file__) + "/../")
|
2013-04-23 22:52:06 +02:00
|
|
|
|
2013-04-21 22:29:27 +02:00
|
|
|
# module name is 'edn' and type binary.
|
2013-12-23 22:38:46 +01:00
|
|
|
myModule = module.Module(__file__, 'ewol', 'LIBRARY')
|
2013-12-22 19:05:43 +01:00
|
|
|
|
2013-11-27 21:33:34 +01:00
|
|
|
# add extra compilation flags :
|
2014-05-27 21:26:40 +02:00
|
|
|
myModule.add_extra_compile_flags()
|
2013-04-21 22:29:27 +02:00
|
|
|
# add the file to compile:
|
2013-12-23 22:38:46 +01:00
|
|
|
myModule.add_src_file([
|
2013-04-21 22:29:27 +02:00
|
|
|
'ewol/ewol.cpp',
|
2013-12-12 22:59:31 +01:00
|
|
|
'ewol/debug.cpp',
|
2014-03-23 08:33:04 +01:00
|
|
|
'ewol/Padding.cpp',
|
2014-05-07 23:30:15 +02:00
|
|
|
'ewol/Dimension.cpp',
|
|
|
|
'ewol/translate.cpp'
|
2013-12-12 22:18:56 +01:00
|
|
|
])
|
2013-04-21 22:29:27 +02:00
|
|
|
|
2013-12-12 22:18:56 +01:00
|
|
|
# compositing :
|
2013-12-23 22:38:46 +01:00
|
|
|
myModule.add_src_file([
|
2013-12-12 22:18:56 +01:00
|
|
|
'ewol/compositing/Compositing.cpp',
|
2014-01-14 21:50:21 +01:00
|
|
|
'ewol/compositing/TextBase.cpp',
|
2013-12-12 22:18:56 +01:00
|
|
|
'ewol/compositing/Text.cpp',
|
2014-01-09 21:40:39 +01:00
|
|
|
'ewol/compositing/TextDF.cpp',
|
2013-12-12 22:18:56 +01:00
|
|
|
'ewol/compositing/Drawing.cpp',
|
|
|
|
'ewol/compositing/Image.cpp',
|
|
|
|
'ewol/compositing/Sprite.cpp',
|
|
|
|
'ewol/compositing/Shaper.cpp',
|
|
|
|
'ewol/compositing/Area.cpp'
|
|
|
|
])
|
2013-08-29 21:50:41 +02:00
|
|
|
|
2013-12-12 22:18:56 +01:00
|
|
|
# context :
|
2013-12-23 22:38:46 +01:00
|
|
|
myModule.add_src_file([
|
2013-12-12 22:18:56 +01:00
|
|
|
'ewol/context/clipBoard.cpp',
|
|
|
|
'ewol/context/commandLine.cpp',
|
|
|
|
'ewol/context/ConfigFont.cpp',
|
|
|
|
'ewol/context/Context.cpp',
|
|
|
|
'ewol/context/cursor.cpp',
|
|
|
|
'ewol/context/InputManager.cpp'
|
|
|
|
])
|
|
|
|
if target.name=="Linux":
|
2013-12-23 22:38:46 +01:00
|
|
|
myModule.add_src_file('ewol/context/X11/Context.cpp')
|
2013-12-12 22:18:56 +01:00
|
|
|
elif target.name=="Windows":
|
2014-01-05 17:30:08 +01:00
|
|
|
myModule.add_src_file('ewol/context/Windows/Context.cpp')
|
|
|
|
elif target.name=="Android":
|
|
|
|
myModule.add_src_file('ewol/context/Android/Context.cpp')
|
2013-12-12 22:18:56 +01:00
|
|
|
elif target.name=="MacOs":
|
2013-12-23 22:38:46 +01:00
|
|
|
myModule.add_src_file([
|
2014-01-05 17:30:08 +01:00
|
|
|
'ewol/context/MacOs/Context.cpp',
|
|
|
|
'ewol/context/MacOs/Interface.mm',
|
|
|
|
'ewol/context/MacOs/Windows.mm',
|
|
|
|
'ewol/context/MacOs/OpenglView.mm',
|
|
|
|
'ewol/context/MacOs/AppDelegate.mm'])
|
2014-01-14 07:41:39 +01:00
|
|
|
elif target.name=="IOs":
|
|
|
|
myModule.add_src_file([
|
2014-04-17 01:25:28 +02:00
|
|
|
'ewol/context/IOs/Context.cpp',
|
|
|
|
'ewol/context/IOs/Interface.m',
|
|
|
|
'ewol/context/IOs/OpenglView.mm',
|
|
|
|
'ewol/context/IOs/AppDelegate.mm'])
|
2013-12-12 22:18:56 +01:00
|
|
|
else:
|
|
|
|
debug.error("unknow mode...")
|
2013-04-21 22:29:27 +02:00
|
|
|
|
2013-12-13 21:58:20 +01:00
|
|
|
# event properties :
|
2013-12-23 22:38:46 +01:00
|
|
|
myModule.add_src_file([
|
2013-12-13 21:58:20 +01:00
|
|
|
'ewol/event/Entry.cpp',
|
|
|
|
'ewol/event/Time.cpp',
|
|
|
|
'ewol/event/Input.cpp'
|
|
|
|
])
|
|
|
|
|
2013-12-12 22:18:56 +01:00
|
|
|
# Key properties :
|
2013-12-23 22:38:46 +01:00
|
|
|
myModule.add_src_file([
|
2013-12-12 22:18:56 +01:00
|
|
|
'ewol/key/keyboard.cpp',
|
|
|
|
'ewol/key/Special.cpp',
|
|
|
|
'ewol/key/status.cpp',
|
|
|
|
'ewol/key/type.cpp'
|
|
|
|
])
|
2013-09-02 06:46:49 +02:00
|
|
|
|
2013-12-12 22:18:56 +01:00
|
|
|
# object :
|
2013-12-23 22:38:46 +01:00
|
|
|
myModule.add_src_file([
|
2013-12-12 22:18:56 +01:00
|
|
|
'ewol/object/Manager.cpp',
|
2014-05-23 12:33:49 +02:00
|
|
|
'ewol/object/Object.cpp',
|
2014-10-29 22:34:06 +01:00
|
|
|
'ewol/object/Worker.cpp'
|
2014-10-29 21:05:49 +01:00
|
|
|
])
|
2014-10-29 22:34:06 +01:00
|
|
|
# parameter :
|
|
|
|
myModule.add_src_file([
|
|
|
|
'ewol/parameter/Parameter.cpp',
|
|
|
|
'ewol/parameter/Interface.cpp',
|
|
|
|
])
|
|
|
|
# Signal :
|
2014-10-29 21:05:49 +01:00
|
|
|
myModule.add_src_file([
|
2014-10-30 21:12:15 +01:00
|
|
|
'ewol/signal/Interface.cpp',
|
2014-10-29 21:05:49 +01:00
|
|
|
'ewol/signal/Base.cpp'
|
2013-12-12 22:18:56 +01:00
|
|
|
])
|
2013-04-21 22:29:27 +02:00
|
|
|
|
2013-12-12 22:18:56 +01:00
|
|
|
# OpenGL interface :
|
2013-12-23 22:38:46 +01:00
|
|
|
myModule.add_src_file([
|
2013-12-12 22:18:56 +01:00
|
|
|
'ewol/openGL/openGL.cpp'
|
|
|
|
])
|
2013-04-21 22:29:27 +02:00
|
|
|
|
2013-12-12 22:18:56 +01:00
|
|
|
# resources :
|
2013-12-23 22:38:46 +01:00
|
|
|
myModule.add_src_file([
|
2013-12-12 22:18:56 +01:00
|
|
|
'ewol/resource/Colored3DObject.cpp',
|
2014-01-17 22:49:11 +01:00
|
|
|
'ewol/resource/ColorFile.cpp',
|
2013-12-12 22:18:56 +01:00
|
|
|
'ewol/resource/ConfigFile.cpp',
|
|
|
|
'ewol/resource/FontFreeType.cpp',
|
|
|
|
'ewol/resource/Image.cpp',
|
2014-01-19 19:16:51 +01:00
|
|
|
'ewol/resource/ImageDF.cpp',
|
2013-12-12 22:18:56 +01:00
|
|
|
'ewol/resource/Manager.cpp',
|
|
|
|
'ewol/resource/Program.cpp',
|
|
|
|
'ewol/resource/Resource.cpp',
|
|
|
|
'ewol/resource/Shader.cpp',
|
|
|
|
'ewol/resource/Texture.cpp',
|
|
|
|
'ewol/resource/TexturedFont.cpp',
|
2014-01-07 21:33:46 +01:00
|
|
|
'ewol/resource/DistanceFieldFont.cpp',
|
2013-12-12 22:18:56 +01:00
|
|
|
'ewol/resource/VirtualBufferObject.cpp'
|
|
|
|
])
|
|
|
|
|
|
|
|
# widget :
|
2013-12-23 22:38:46 +01:00
|
|
|
myModule.add_src_file([
|
2013-04-21 22:29:27 +02:00
|
|
|
'ewol/widget/ButtonColor.cpp',
|
2013-12-12 22:18:56 +01:00
|
|
|
'ewol/widget/Button.cpp',
|
2013-04-21 22:29:27 +02:00
|
|
|
'ewol/widget/CheckBox.cpp',
|
|
|
|
'ewol/widget/ColorBar.cpp',
|
|
|
|
'ewol/widget/Composer.cpp',
|
|
|
|
'ewol/widget/Container.cpp',
|
2014-01-23 21:12:54 +01:00
|
|
|
'ewol/widget/Container2.cpp',
|
2013-04-21 22:29:27 +02:00
|
|
|
'ewol/widget/ContainerN.cpp',
|
2013-12-12 22:18:56 +01:00
|
|
|
'ewol/widget/ContextMenu.cpp',
|
2013-04-21 22:29:27 +02:00
|
|
|
'ewol/widget/Entry.cpp',
|
2013-12-12 22:18:56 +01:00
|
|
|
'ewol/widget/Gird.cpp',
|
|
|
|
'ewol/widget/Image.cpp',
|
2013-04-21 22:29:27 +02:00
|
|
|
'ewol/widget/Joystick.cpp',
|
|
|
|
'ewol/widget/Label.cpp',
|
2013-12-12 22:18:56 +01:00
|
|
|
'ewol/widget/Layer.cpp',
|
2013-04-21 22:29:27 +02:00
|
|
|
'ewol/widget/List.cpp',
|
|
|
|
'ewol/widget/ListFileSystem.cpp',
|
2013-12-12 22:18:56 +01:00
|
|
|
'ewol/widget/Manager.cpp',
|
2013-04-21 22:29:27 +02:00
|
|
|
'ewol/widget/Menu.cpp',
|
2013-12-12 22:18:56 +01:00
|
|
|
'ewol/widget/meta/ColorChooser.cpp',
|
|
|
|
'ewol/widget/meta/FileChooser.cpp',
|
|
|
|
'ewol/widget/meta/Parameter.cpp',
|
|
|
|
'ewol/widget/meta/ParameterList.cpp',
|
|
|
|
'ewol/widget/meta/StdPopUp.cpp',
|
2013-04-21 22:29:27 +02:00
|
|
|
'ewol/widget/PopUp.cpp',
|
|
|
|
'ewol/widget/ProgressBar.cpp',
|
2013-05-08 12:20:47 +02:00
|
|
|
'ewol/widget/Scroll.cpp',
|
2013-04-21 22:29:27 +02:00
|
|
|
'ewol/widget/Sizer.cpp',
|
|
|
|
'ewol/widget/Slider.cpp',
|
|
|
|
'ewol/widget/Spacer.cpp',
|
2013-12-13 21:58:20 +01:00
|
|
|
'ewol/widget/Widget.cpp',
|
2013-04-21 22:29:27 +02:00
|
|
|
'ewol/widget/WidgetScrolled.cpp',
|
2013-12-12 22:18:56 +01:00
|
|
|
'ewol/widget/Windows.cpp',
|
|
|
|
'ewol/widget/WSlider.cpp',
|
|
|
|
])
|
2013-04-21 22:29:27 +02:00
|
|
|
|
2015-05-07 23:02:33 +02:00
|
|
|
myModule.copy_folder('data/theme/shape/square/*','theme/shape/square')
|
|
|
|
myModule.copy_folder('data/theme/shape/round/*','theme/shape/round')
|
|
|
|
myModule.copy_folder('data/theme/color/black/*','theme/color/black')
|
|
|
|
myModule.copy_folder('data/theme/color/white/*','theme/color/white')
|
|
|
|
myModule.copy_folder('data/textured.*','')
|
|
|
|
myModule.copy_folder('data/texturedNoMaterial.*','')
|
|
|
|
myModule.copy_folder('data/text.*','')
|
|
|
|
myModule.copy_folder('data/simple3D.*','')
|
|
|
|
myModule.copy_folder('data/color.*','')
|
|
|
|
myModule.copy_folder('data/color3.*','')
|
|
|
|
myModule.copy_folder('data/textured3D2.*','')
|
|
|
|
myModule.copy_folder('data/textured3D.*','')
|
|
|
|
myModule.copy_folder('data/texturedDF.*','')
|
|
|
|
myModule.copy_folder('data/fontDistanceField/*','fontDistanceField')
|
|
|
|
myModule.copy_folder('data/translate/*','translate/ewol/')
|
2013-04-21 22:29:27 +02:00
|
|
|
|
|
|
|
# name of the dependency
|
2014-01-08 21:15:01 +01:00
|
|
|
myModule.add_module_depend(['etk', 'freetype', 'exml', 'ejson', 'egami', 'edtaa3', 'date'])
|
2013-04-21 22:29:27 +02:00
|
|
|
|
2013-12-23 22:38:46 +01:00
|
|
|
myModule.add_export_path(tools.get_current_path(__file__))
|
2014-01-05 17:30:08 +01:00
|
|
|
|
2013-12-23 22:38:46 +01:00
|
|
|
tagFile = tools.get_current_path(__file__) + "/tag"
|
|
|
|
ewolVersionID = tools.file_read_data(tagFile)
|
|
|
|
myModule.compile_flags_CC([
|
2013-11-28 22:06:53 +01:00
|
|
|
"-DEWOL_VERSION=\"\\\""+ewolVersionID+"\\\"\""
|
|
|
|
])
|
|
|
|
|
2013-04-22 21:21:36 +02:00
|
|
|
if target.name=="Linux":
|
2013-12-23 22:38:46 +01:00
|
|
|
myModule.add_export_flag_LD('-lGL')
|
2013-04-22 21:21:36 +02:00
|
|
|
|
|
|
|
#`pkg-config --cflags directfb` `pkg-config --libs directfb`
|
|
|
|
|
|
|
|
#ifeq ("$(CONFIG___EWOL_LINUX_GUI_MODE_X11__)","y")
|
2013-12-23 22:38:46 +01:00
|
|
|
myModule.add_export_flag_LD('-lX11')
|
2013-04-22 21:21:36 +02:00
|
|
|
#endif
|
|
|
|
#ifeq ("$(CONFIG___EWOL_LINUX_GUI_MODE_DIRECT_FB__)","y")
|
2013-12-23 22:38:46 +01:00
|
|
|
#myModule.add_export_flag_LD(['-L/usr/local/lib', '-ldirectfb', '-lfusion', '-ldirect'])
|
2013-04-22 21:21:36 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#http://en.wikibooks.org/wiki/OpenGL_Programming/Modern_OpenGL_Introduction
|
|
|
|
# needed package on linux : libgl1-mesa-dev libglew1.5-dev
|
|
|
|
|
|
|
|
#ifeq ("$(CONFIG_BUILD_PORTAUDIO)","y")
|
2013-12-23 22:38:46 +01:00
|
|
|
#myModule.add_src_file('ewol/renderer/audio/interfacePortAudio.cpp')
|
2013-04-22 21:21:36 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
elif target.name=="Android":
|
2013-12-23 22:38:46 +01:00
|
|
|
myModule.add_export_flag_LD("-lGLESv2")
|
2013-04-22 21:21:36 +02:00
|
|
|
|
2013-12-23 22:38:46 +01:00
|
|
|
myModule.add_export_flag_LD("-ldl")
|
|
|
|
myModule.add_export_flag_LD("-llog")
|
|
|
|
myModule.add_export_flag_LD("-landroid")
|
2015-05-07 23:02:33 +02:00
|
|
|
java_tmp_dir = tools.get_current_path(__file__) + "/android/src/"
|
2013-12-23 22:38:46 +01:00
|
|
|
cpp_tmp_dir = tools.get_current_path(__file__) + "/ewol/renderer/Android/"
|
2013-07-10 18:49:18 +02:00
|
|
|
java_tmp_src = java_tmp_dir + "org/ewol/EwolConstants"
|
2015-02-16 21:40:51 +01:00
|
|
|
# TODO : set the build directory in out/.build with option -d ...
|
|
|
|
debugCommand = ""
|
|
|
|
if debug.get_level() >= 4:
|
|
|
|
debugCommand = " -verbose "
|
|
|
|
lutinMultiprocess.run_command("javac " + debugCommand + java_tmp_src + ".java")
|
|
|
|
lutinMultiprocess.run_command("javah " + debugCommand + "-classpath " + java_tmp_dir + " -d " + cpp_tmp_dir + " org.ewol.EwolConstants")
|
2013-12-23 22:38:46 +01:00
|
|
|
tools.remove_file(java_tmp_src + ".class")
|
2013-04-23 22:52:06 +02:00
|
|
|
elif target.name=="Windows":
|
2013-12-23 22:38:46 +01:00
|
|
|
myModule.add_module_depend("glew")
|
2013-04-25 00:57:47 +02:00
|
|
|
elif target.name=="MacOs":
|
2013-12-23 22:38:46 +01:00
|
|
|
myModule.add_export_flag_LD([
|
2013-04-25 00:57:47 +02:00
|
|
|
"-framework Cocoa",
|
|
|
|
"-framework OpenGL",
|
|
|
|
"-framework QuartzCore",
|
|
|
|
"-framework AppKit"])
|
2014-04-17 01:25:28 +02:00
|
|
|
elif target.name=="IOs":
|
|
|
|
myModule.add_export_flag_LD([
|
|
|
|
"-framework OpenGLES",
|
|
|
|
"-framework CoreGraphics",
|
|
|
|
"-framework UIKit",
|
|
|
|
"-framework GLKit",
|
|
|
|
"-framework Foundation",
|
|
|
|
"-framework QuartzCore"])
|
2015-02-16 21:40:51 +01:00
|
|
|
|
2013-04-22 21:21:36 +02:00
|
|
|
return myModule
|
|
|
|
|