summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2009-06-16 13:01:36 +0000
committerCedric BAIL <cedric.bail@free.fr>2009-06-16 13:01:36 +0000
commit575b0579cde450b6cd4849a5085c9da500ad8b86 (patch)
treec43bd69c4d65e7b0e24a5ea025e8302c06878812 /legacy
parente0c6b0df8da8d6f14294767e02117cb0ddc69059 (diff)
* evas: Move to Eina module and make it possible to build a libevas with
everything in it. Note: This patch break the module API, so make sure you recompile and install every thing. SVN revision: 41055
Diffstat (limited to 'legacy')
-rw-r--r--legacy/evas/configure.ac83
-rw-r--r--legacy/evas/m4/evas_check_engine.m418
-rw-r--r--legacy/evas/m4/evas_check_loader.m417
-rw-r--r--legacy/evas/src/lib/Makefile.am163
-rw-r--r--legacy/evas/src/lib/canvas/evas_main.c98
-rw-r--r--legacy/evas/src/lib/engines/common/evas_image_load.c40
-rw-r--r--legacy/evas/src/lib/engines/common/evas_image_save.c2
-rw-r--r--legacy/evas/src/lib/file/evas_module.c666
-rw-r--r--legacy/evas/src/lib/file/evas_module.h58
-rw-r--r--legacy/evas/src/modules/engines/Makefile.am82
-rw-r--r--legacy/evas/src/modules/engines/buffer/Makefile.am20
-rw-r--r--legacy/evas/src/modules/engines/buffer/evas_engine.c26
-rw-r--r--legacy/evas/src/modules/engines/cairo_x11/Makefile.am24
-rw-r--r--legacy/evas/src/modules/engines/cairo_x11/evas_engine.c24
-rw-r--r--legacy/evas/src/modules/engines/direct3d/Makefile.am25
-rw-r--r--legacy/evas/src/modules/engines/direct3d/evas_engine.c25
-rw-r--r--legacy/evas/src/modules/engines/directfb/Makefile.am19
-rw-r--r--legacy/evas/src/modules/engines/directfb/evas_engine.c25
-rw-r--r--legacy/evas/src/modules/engines/fb/Makefile.am25
-rw-r--r--legacy/evas/src/modules/engines/fb/evas_engine.c25
-rw-r--r--legacy/evas/src/modules/engines/gl_glew/Makefile.am25
-rw-r--r--legacy/evas/src/modules/engines/gl_glew/evas_engine.c23
-rw-r--r--legacy/evas/src/modules/engines/gl_x11/Makefile.am25
-rw-r--r--legacy/evas/src/modules/engines/gl_x11/evas_engine.c24
-rw-r--r--legacy/evas/src/modules/engines/quartz/Makefile.am20
-rw-r--r--legacy/evas/src/modules/engines/quartz/evas_engine.c23
-rw-r--r--legacy/evas/src/modules/engines/software_16/Makefile.am18
-rw-r--r--legacy/evas/src/modules/engines/software_16/evas_engine.c21
-rw-r--r--legacy/evas/src/modules/engines/software_16_ddraw/Makefile.am27
-rw-r--r--legacy/evas/src/modules/engines/software_16_ddraw/evas_engine.c23
-rw-r--r--legacy/evas/src/modules/engines/software_16_sdl/Makefile.am20
-rw-r--r--legacy/evas/src/modules/engines/software_16_sdl/evas_engine.c25
-rw-r--r--legacy/evas/src/modules/engines/software_16_wince/Makefile.am27
-rw-r--r--legacy/evas/src/modules/engines/software_16_wince/evas_engine.c21
-rw-r--r--legacy/evas/src/modules/engines/software_16_x11/Makefile.am25
-rw-r--r--legacy/evas/src/modules/engines/software_16_x11/evas_engine.c26
-rw-r--r--legacy/evas/src/modules/engines/software_ddraw/Makefile.am25
-rw-r--r--legacy/evas/src/modules/engines/software_ddraw/evas_engine.c21
-rw-r--r--legacy/evas/src/modules/engines/software_gdi/Makefile.am25
-rw-r--r--legacy/evas/src/modules/engines/software_gdi/evas_engine.c21
-rw-r--r--legacy/evas/src/modules/engines/software_generic/Makefile.am14
-rw-r--r--legacy/evas/src/modules/engines/software_generic/evas_engine.c25
-rw-r--r--legacy/evas/src/modules/engines/software_qtopia/Makefile.am25
-rw-r--r--legacy/evas/src/modules/engines/software_qtopia/evas_engine.c23
-rw-r--r--legacy/evas/src/modules/engines/software_sdl/Makefile.am20
-rw-r--r--legacy/evas/src/modules/engines/software_sdl/evas_engine.c23
-rw-r--r--legacy/evas/src/modules/engines/software_x11/Makefile.am29
-rw-r--r--legacy/evas/src/modules/engines/software_x11/evas_engine.c24
-rw-r--r--legacy/evas/src/modules/engines/xrender_x11/Makefile.am31
-rw-r--r--legacy/evas/src/modules/engines/xrender_x11/evas_engine.c24
-rw-r--r--legacy/evas/src/modules/loaders/Makefile.am18
-rw-r--r--legacy/evas/src/modules/loaders/edb/Makefile.am11
-rw-r--r--legacy/evas/src/modules/loaders/edb/evas_image_load_edb.c35
-rw-r--r--legacy/evas/src/modules/loaders/eet/Makefile.am11
-rw-r--r--legacy/evas/src/modules/loaders/eet/evas_image_load_eet.c24
-rw-r--r--legacy/evas/src/modules/loaders/gif/Makefile.am11
-rw-r--r--legacy/evas/src/modules/loaders/gif/evas_image_load_gif.c38
-rw-r--r--legacy/evas/src/modules/loaders/jpeg/Makefile.am10
-rw-r--r--legacy/evas/src/modules/loaders/jpeg/evas_image_load_jpeg.c37
-rw-r--r--legacy/evas/src/modules/loaders/pmaps/Makefile.am10
-rw-r--r--legacy/evas/src/modules/loaders/pmaps/evas_image_load_pmaps.c21
-rw-r--r--legacy/evas/src/modules/loaders/png/Makefile.am10
-rw-r--r--legacy/evas/src/modules/loaders/png/evas_image_load_png.c35
-rw-r--r--legacy/evas/src/modules/loaders/svg/Makefile.am10
-rw-r--r--legacy/evas/src/modules/loaders/svg/evas_image_load_svg.c30
-rw-r--r--legacy/evas/src/modules/loaders/tiff/Makefile.am11
-rw-r--r--legacy/evas/src/modules/loaders/tiff/evas_image_load_tiff.c34
-rw-r--r--legacy/evas/src/modules/loaders/xpm/Makefile.am12
-rw-r--r--legacy/evas/src/modules/loaders/xpm/evas_image_load_xpm.c38
-rw-r--r--legacy/evas/src/modules/savers/Makefile.am10
-rw-r--r--legacy/evas/src/modules/savers/edb/Makefile.am11
-rw-r--r--legacy/evas/src/modules/savers/edb/evas_image_save_edb.c30
-rw-r--r--legacy/evas/src/modules/savers/eet/Makefile.am11
-rw-r--r--legacy/evas/src/modules/savers/eet/evas_image_save_eet.c31
-rw-r--r--legacy/evas/src/modules/savers/jpeg/Makefile.am10
-rw-r--r--legacy/evas/src/modules/savers/jpeg/evas_image_save_jpeg.c31
-rw-r--r--legacy/evas/src/modules/savers/png/Makefile.am11
-rw-r--r--legacy/evas/src/modules/savers/png/evas_image_save_png.c31
-rw-r--r--legacy/evas/src/modules/savers/tiff/Makefile.am11
-rw-r--r--legacy/evas/src/modules/savers/tiff/evas_image_save_tiff.c31
80 files changed, 1906 insertions, 886 deletions
diff --git a/legacy/evas/configure.ac b/legacy/evas/configure.ac
index 249a2d004c..a34642505e 100644
--- a/legacy/evas/configure.ac
+++ b/legacy/evas/configure.ac
@@ -405,6 +405,33 @@ if test "x$have_evas_engine_software_16_wince" = "xyes"; then
405fi 405fi
406AM_CONDITIONAL(BUILD_ENGINE_SOFTWARE_16, test "x$have_evas_engine_software_16" = "xyes") 406AM_CONDITIONAL(BUILD_ENGINE_SOFTWARE_16, test "x$have_evas_engine_software_16" = "xyes")
407 407
408# if software generic need to be build as part of libevas.so
409have_static_software_generic="no"
410AC_ARG_ENABLE([static-software-generic],
411 [AC_HELP_STRING([--enable-static-software-generic], [Build software generic engine as part of libevas])],
412 [have_static_software_generic=${enableval}]
413)
414AC_MSG_CHECKING([Whether to build software generic engine as part of libevas])
415AC_MSG_RESULT([${have_static_software_generic}])
416
417AM_CONDITIONAL(EVAS_STATIC_BUILD_SOFTWARE_GENERIC, test "x${have_static_software_generic}" = "xyes")
418if test "x${have_static_software_generic}" = "xyes"; then
419 AC_DEFINE(EVAS_STATIC_BUILD_SOFTWARE_GENERIC, [1], [Build software generic engine as part of libevas])
420fi
421
422# if software 16 need to be build as part of libevas.so
423have_static_software_16="no"
424AC_ARG_ENABLE([static-software-16],
425 [AC_HELP_STRING([--enable-static-software-16], [Build software 16 engine as part of libevas])],
426 [have_static_software_16=${enableval}]
427)
428AC_MSG_CHECKING([Whether to build software 16 engine as part of libevas])
429AC_MSG_RESULT([${have_static_software_16}])
430
431AM_CONDITIONAL(EVAS_STATIC_BUILD_SOFTWARE_16, test "x${have_static_software_16}" = "xyes")
432if test "x${have_static_software_16}" = "xyes"; then
433 AC_DEFINE(EVAS_STATIC_BUILD_SOFTWARE_16, [1], [Build software 16 engine as part of libevas])
434fi
408 435
409##################################################################### 436#####################################################################
410## Image loaders 437## Image loaders
@@ -1198,37 +1225,37 @@ echo
1198echo "Configuration Options Summary:" 1225echo "Configuration Options Summary:"
1199echo 1226echo
1200echo "Engines:" 1227echo "Engines:"
1201echo " Software Memory Buffer.....: $have_evas_engine_buffer" 1228echo " Software Memory Buffer.....: $have_evas_engine_buffer $have_static_evas_engine_buffer"
1202echo " Software X11...............: $have_evas_engine_software_x11 (XCB: $have_evas_engine_software_xcb)" 1229echo " Software X11...............: $have_evas_engine_software_x11 $have_static_evas_engine_software_x11 (XCB: $have_evas_engine_software_xcb)"
1203echo " XRender X11................: $have_evas_engine_xrender_x11 (XCB: $have_evas_engine_xrender_xcb)" 1230echo " XRender X11................: $have_evas_engine_xrender_x11 $have_static_evas_engine_xrender_x11 (XCB: $have_evas_engine_xrender_xcb)"
1204echo " OpenGL X11.................: $have_evas_engine_gl_x11" 1231echo " OpenGL X11.................: $have_evas_engine_gl_x11 $have_static_evas_engine_gl_x11"
1205#echo " Cairo X11..................: $have_evas_engine_cairo_x11" 1232#echo " Cairo X11..................: $have_evas_engine_cairo_x11 $have_static_evas_engine_cairo_x11"
1206echo " Software GDI...............: $have_evas_engine_software_gdi" 1233echo " Software GDI...............: $have_evas_engine_software_gdi $have_static_evas_engine_gdi"
1207echo " Software DirectDraw........: $have_evas_engine_software_ddraw" 1234echo " Software DirectDraw........: $have_evas_engine_software_ddraw $have_static_evas_engine_ddraw"
1208echo " Direct3d...................: $have_evas_engine_direct3d" 1235echo " Direct3d...................: $have_evas_engine_direct3d $have_static_evas_engine_direct3d"
1209echo " Quartz.....................: $have_evas_engine_quartz" 1236echo " Quartz.....................: $have_evas_engine_quartz $have_static_evas_engine_quartz"
1210echo " OpenGL Glew................: $have_evas_engine_gl_glew" 1237echo " OpenGL Glew................: $have_evas_engine_gl_glew $have_static_evas_engine_gl_glew"
1211echo " Software SDL...............: $have_evas_engine_software_sdl (primitive: $sdl_primitive)" 1238echo " Software SDL...............: $have_evas_engine_software_sdl $have_static_evas_engine_software_sdl (primitive: $sdl_primitive)"
1212echo " Software Framebuffer.......: $have_evas_engine_fb" 1239echo " Software Framebuffer.......: $have_evas_engine_fb $have_static_evas_engine_fb"
1213echo " DirectFB...................: $have_evas_engine_directfb" 1240echo " DirectFB...................: $have_evas_engine_directfb $have_static_evas_engine_directfb"
1214#echo " Software Qtopia............: $have_evas_engine_software_qtopia" 1241#echo " Software Qtopia............: $have_evas_engine_software_qtopia $have_static_evas_engine_software_qtopia"
1215echo " Software 16bit ............: $have_evas_engine_software_16" 1242echo " Software 16bit ............: $have_evas_engine_software_16 $have_static_evas_engine_software_16"
1216echo " Software 16bit X11.........: $have_evas_engine_software_16_x11" 1243echo " Software 16bit X11.........: $have_evas_engine_software_16_x11 $have_static_evas_engine_software_16_x11"
1217echo " Software 16bit Directdraw..: $have_evas_engine_software_16_ddraw" 1244echo " Software 16bit Directdraw..: $have_evas_engine_software_16_ddraw $have_static_evas_engine_ddraw"
1218echo " Software 16bit WinCE.......: $have_evas_engine_software_16_wince" 1245echo " Software 16bit WinCE.......: $have_evas_engine_software_16_wince $have_static_evas_engine_wince"
1219echo " Software 16bit SDL.........: $have_evas_engine_software_sdl (primitive: $sdl_primitive)" 1246echo " Software 16bit SDL.........: $have_evas_engine_software_sdl $have_static_evas_engine_software_sdl (primitive: $sdl_primitive)"
1220# FIXME: opengl engine needs to be fixed and tested lots for all drivers 1247# FIXME: opengl engine needs to be fixed and tested lots for all drivers
1221echo 1248echo
1222echo "Image Loaders:" 1249echo "Image Loaders:"
1223echo " EDB.....................: $have_evas_image_loader_edb" 1250echo " EDB.....................: $have_evas_image_loader_edb $have_static_evas_image_loader_edb"
1224echo " EET.....................: $have_evas_image_loader_eet" 1251echo " EET.....................: $have_evas_image_loader_eet $have_static_evas_image_loader_eet"
1225echo " GIF.....................: $have_evas_image_loader_gif" 1252echo " GIF.....................: $have_evas_image_loader_gif $have_static_evas_image_loader_gif"
1226echo " JPEG....................: $have_evas_image_loader_jpeg" 1253echo " JPEG....................: $have_evas_image_loader_jpeg $have_static_evas_image_loader_jpg"
1227echo " PMAPS...................: $have_evas_image_loader_pmaps" 1254echo " PMAPS...................: $have_evas_image_loader_pmaps $have_static_evas_image_loader_pmaps"
1228echo " PNG.....................: $have_evas_image_loader_png" 1255echo " PNG.....................: $have_evas_image_loader_png $have_static_evas_image_loader_png"
1229echo " SVG.....................: $have_evas_image_loader_svg" 1256echo " SVG.....................: $have_evas_image_loader_svg $have_static_evas_image_loader_svg"
1230echo " TIFF....................: $have_evas_image_loader_tiff" 1257echo " TIFF....................: $have_evas_image_loader_tiff $have_static_evas_image_loader_tiff"
1231echo " XPM.....................: $have_evas_image_loader_xpm" 1258echo " XPM.....................: $have_evas_image_loader_xpm $have_static_evas_image_loader_xpm"
1232# FIXME: need to add modular image loader system 1259# FIXME: need to add modular image loader system
1233# FIXME: add more image loader modules 1260# FIXME: add more image loader modules
1234echo 1261echo
diff --git a/legacy/evas/m4/evas_check_engine.m4 b/legacy/evas/m4/evas_check_engine.m4
index 2ad18f8806..1af1c30f86 100644
--- a/legacy/evas/m4/evas_check_engine.m4
+++ b/legacy/evas/m4/evas_check_engine.m4
@@ -617,6 +617,24 @@ fi
617 617
618AM_CONDITIONAL(BUILD_ENGINE_[]UP, [test "x${have_evas_engine_[]DOWN}" = "xyes"]) 618AM_CONDITIONAL(BUILD_ENGINE_[]UP, [test "x${have_evas_engine_[]DOWN}" = "xyes"])
619 619
620want_static="no"
621have_static_evas_engine_[]DOWN=""
622
623AC_ARG_ENABLE([static-$1],
624 [AC_HELP_STRING([--enable-static-$1], [enable static build of $4 rendering backend])],
625 [want_static=${enableval}]
626)
627
628AC_MSG_CHECKING([whether to statically include $4 rendering backend inside evas library])
629AC_MSG_RESULT([${want_static}])
630
631AM_CONDITIONAL(EVAS_STATIC_BUILD_[]UP, [test "x${want_static}" = "xyes" -a "x${have_evas_engine_[]DOWN}" = "xyes"])
632
633if test "x${want_static}" = "xyes" -a "x${have_evas_engine_[]DOWN}" = "xyes"; then
634 have_static_evas_engine_[]DOWN="(static)"
635 AC_DEFINE(EVAS_STATIC_BUILD_[]UP, [1], [Build $1 engine inside libevas])
636fi
637
620m4_popdef([UP]) 638m4_popdef([UP])
621m4_popdef([DOWN]) 639m4_popdef([DOWN])
622 640
diff --git a/legacy/evas/m4/evas_check_loader.m4 b/legacy/evas/m4/evas_check_loader.m4
index e30d2c0c50..c0b7c76842 100644
--- a/legacy/evas/m4/evas_check_loader.m4
+++ b/legacy/evas/m4/evas_check_loader.m4
@@ -304,6 +304,23 @@ fi
304 304
305AM_CONDITIONAL(BUILD_LOADER_[]UP, [test "x${have_evas_image_loader_[]DOWN}" = "xyes"]) 305AM_CONDITIONAL(BUILD_LOADER_[]UP, [test "x${have_evas_image_loader_[]DOWN}" = "xyes"])
306 306
307want_static_[]DOWN="no"
308have_static_evas_image_loader_[]DOWN=""
309
310AC_ARG_ENABLE([static-image-loader-[]DOWN],
311 [AC_HELP_STRING([--enable-static-image-loader-[]DOWN], [Build $1 image loader inside evas library])],
312 [want_static_[]DOWN=${enableval}]
313)
314AC_MSG_CHECKING([whether to build inside evas library $1 image loader])
315AC_MSG_RESULT([${want_static_[]DOWN}])
316
317AM_CONDITIONAL(EVAS_STATIC_BUILD_[]UP, [test "x${want_static_[]DOWN}" = "xyes" -a "x${have_evas_image_loader_[]DOWN}" = "xyes"])
318
319if test "x${want_static_[]DOWN}" = "xyes" -a "x${have_evas_image_loader_[]DOWN}" = "xyes"; then
320 have_static_evas_image_loader_[]DOWN="(static)"
321 AC_DEFINE(EVAS_STATIC_BUILD_[]UP, [1], [Build $1 image loader inside libevas])
322fi
323
307m4_popdef([UP]) 324m4_popdef([UP])
308m4_popdef([DOWN]) 325m4_popdef([DOWN])
309 326
diff --git a/legacy/evas/src/lib/Makefile.am b/legacy/evas/src/lib/Makefile.am
index 4b22a8783f..67895d033b 100644
--- a/legacy/evas/src/lib/Makefile.am
+++ b/legacy/evas/src/lib/Makefile.am
@@ -1,6 +1,164 @@
1MAINTAINERCLEANFILES = Makefile.in 1MAINTAINERCLEANFILES = Makefile.in
2 2
3SUBDIRS = canvas data cache cserve file engines imaging include 3SUBDIRS = canvas data cache cserve file engines imaging include
4EVAS_STATIC_MODULE =
5EVAS_STATIC_LIBADD =
6
7if EVAS_STATIC_BUILD_SOFTWARE_GENERIC
8SUBDIRS += ../modules/engines/software_generic/
9EVAS_STATIC_MODULE += ../modules/engines/software_generic/libevas_engine_software_generic.la
10endif
11if EVAS_STATIC_BUILD_BUFFER
12SUBDIRS += ../modules/engines/buffer/
13EVAS_STATIC_MODULE += ../modules/engines/buffer/libevas_engine_buffer.la
14endif
15if EVAS_STATIC_BUILD_DIRECT3D
16SUBDIRS += ../modules/engines/direct3d/
17EVAS_STATIC_MODULE += ../modules/engines/direct3d/libevas_engine_direct3d.la
18EVAS_STATIC_LIBADD += @evas_engine_direct3d_libs@
19endif
20if EVAS_STATIC_BUILD_DIRECTFB
21SUBDIRS += ../modules/engines/directfb/
22EVAS_STATIC_MODULE += ../modules/engines/directfb/libevas_engine_directfb.la
23EVAS_STATIC_LIBADD += @evas_engine_directfb_libs@
24endif
25if EVAS_STATIC_BUILD_FB
26SUBDIRS += ../modules/engines/fb/
27EVAS_STATIC_MODULE += ../modules/engines/fb/libevas_engine_fb.la
28EVAS_STATIC_LIBADD += @evas_engine_fb_libs@
29endif
30if EVAS_STATIC_BUILD_GL_GLEW
31SUBDIRS += \
32 ../modules/engines/gl_common \
33 ../modules/engines/gl_glew
34EVAS_STATIC_MODULE += \
35 ../modules/engines/gl_common/libevas_engine_gl_common.la \
36 ../modules/engines/gl_glew/libevas_engine_gl_glew.la
37EVAS_STATIC_LIBADD += @evas_engine_gl_common_libs@ @evas_engine_gl_glew_libs@
38endif
39if EVAS_STATIC_BUILD_GL_X11
40SUBDIRS += \
41 ../modules/engines/gl_common \
42 ../modules/engines/gl_x11
43EVAS_STATIC_MODULE += \
44 ../modules/engines/gl_common/libevas_engine_gl_common.la \
45 ../modules/engines/gl_x11/libevas_engine_gl_x11.la
46EVAS_STATIC_LIBADD += @evas_engine_gl_common_libs@ @evas_engine_gl_x11_libs@
47endif
48if EVAS_STATIC_BUILD_QUARTZ
49SUBDIRS += ../modules/engines/quartz/
50EVAS_STATIC_MODULE += ../modules/engines/quartz/libevas_engine_quartz.la
51EVAS_STATIC_LIBADD += @evas_engine_quartz_libs@
52endif
53if EVAS_STATIC_BUILD_SOFTWARE_16
54SUBDIRS += ../modules/engines/software_16/
55EVAS_STATIC_MODULE += ../modules/engines/software_16/libevas_engine_software_16.la
56endif
57if EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW
58SUBDIRS += ../modules/engines/software_16_ddraw/
59EVAS_STATIC_MODULE += ../modules/engines/software_16_ddraw/libevas_engine_software_16_ddraw.la
60EVAS_STATIC_LIBADD += @evas_engine_software_16_ddraw_libs@
61endif
62if EVAS_STATIC_BUILD_SOFTWARE_16_WINCE
63SUBDIRS += ../modules/engines/software_16_wince/
64EVAS_STATIC_MODULE += ../modules/engines/software_16_wince/libevas_engine_software_16_wince.la
65EVAS_STATIC_LIBADD += @evas_engine_software_16_wince_libs@
66endif
67if EVAS_STATIC_BUILD_SOFTWARE_16_X11
68SUBDIRS += ../modules/engines/software_16_x11/
69EVAS_STATIC_MODULE += ../modules/engines/software_16_x11/libevas_engine_software_16_x11.la
70EVAS_STATIC_LIBADD += @evas_engine_software_16_x11_libs@
71endif
72if EVAS_STATIC_BUILD_SOFTWARE_SDL
73SUBDIRS += \
74 ../modules/engines/software_16_sdl/ \
75 ../modules/engines/software_sdl/
76EVAS_STATIC_MODULE += \
77 ../modules/engines/software_16_sdl/libevas_engine_software_16_sdl.la \
78 ../modules/engines/software_sdl/libevas_engine_software_sdl.la
79EVAS_STATIC_LIBADD += @SDL_LIBS@
80endif
81if EVAS_STATIC_BUILD_SOFTWARE_DDRAW
82SUBDIRS += ../modules/engines/software_ddraw/
83EVAS_STATIC_MODULE += ../modules/engines/software_ddraw/libevas_engine_software_ddraw.la
84EVAS_STATIC_LIBADD += @evas_engine_software_ddraw_libs@
85endif
86if EVAS_STATIC_BUILD_SOFTWARE_GDI
87SUBDIRS += ../modules/engines/software_gdi/
88EVAS_STATIC_MODULE += ../modules/engines/software_gdi/libevas_engine_software_gdi.la
89EVAS_STATIC_LIBADD += @evas_engine_software_gdi_libs@
90endif
91if EVAS_STATIC_BUILD_SOFTWARE_X11
92SUBDIRS += ../modules/engines/software_x11/
93EVAS_STATIC_MODULE += ../modules/engines/software_x11/libevas_engine_software_x11.la
94EVAS_STATIC_LIBADD += @evas_engine_software_x11_libs@ @evas_engine_software_xcb_libs@
95endif
96if EVAS_STATIC_BUILD_XRENDER_X11
97SUBDIRS += ../modules/engines/xrender_x11/
98EVAS_STATIC_MODULE += ../modules/engines/xrender_x11/libevas_engine_xrender_x11.la
99EVAS_STATIC_LIBADD += @evas_engine_xrender_x11_libs@ @evas_engine_xrender_xcb_libs@
100endif
101if EVAS_STATIC_BUILD_EDB
102SUBDIRS += ../modules/savers/edb ../modules/loaders/edb
103EVAS_STATIC_MODULE += ../modules/savers/edb/libevas_saver_edb.la ../modules/loaders/edb/libevas_loader_edb.la
104EVAS_STATIC_LIBADD += @evas_image_loader_edb_libs@
105endif
106if EVAS_STATIC_BUILD_EET
107SUBDIRS += ../modules/savers/eet ../modules/loaders/eet
108EVAS_STATIC_MODULE += ../modules/savers/eet/libevas_saver_eet.la ../modules/loaders/eet/libevas_loader_eet.la
109EVAS_STATIC_LIBADD += @evas_image_loader_eet_libs@
110endif
111if EVAS_STATIC_BUILD_GIF
112SUBDIRS += ../modules/loaders/gif
113EVAS_STATIC_MODULE += ../modules/loaders/gif/libevas_loader_gif.la
114EVAS_STATIC_LIBADD += @evas_image_loader_gif_libs@
115endif
116if EVAS_STATIC_BUILD_JPEG
117SUBDIRS += ../modules/savers/jpeg ../modules/loaders/jpeg
118EVAS_STATIC_MODULE += ../modules/savers/jpeg/libevas_saver_jpeg.la ../modules/loaders/jpeg/libevas_loader_jpeg.la
119EVAS_STATIC_LIBADD += @evas_image_loader_jpeg_libs@
120endif
121if EVAS_STATIC_BUILD_PMAPS
122SUBDIRS += ../modules/loaders/pmaps
123EVAS_STATIC_MODULE += ../modules/loaders/pmaps/libevas_loader_pmaps.la
124EVAS_STATIC_LIBADD += @evas_image_loader_pmaps_libs@
125endif
126if EVAS_STATIC_BUILD_PNG
127SUBDIRS += ../modules/savers/png ../modules/loaders/png
128EVAS_STATIC_MODULE += ../modules/savers/png/libevas_saver_png.la ../modules/loaders/png/libevas_loader_png.la
129EVAS_STATIC_LIBADD += @evas_image_loader_png_libs@
130endif
131if EVAS_STATIC_BUILD_SVG
132SUBDIRS += ../modules/loaders/svg
133EVAS_STATIC_MODULE += ../modules/loaders/svg/libevas_loader_svg.la
134EVAS_STATIC_LIBADD += @evas_image_loader_svg_libs@
135endif
136if EVAS_STATIC_BUILD_TIFF
137SUBDIRS += ../modules/savers/tiff ../modules/loaders/tiff
138EVAS_STATIC_MODULE += ../modules/savers/tiff/libevas_saver_tiff.la ../modules/loaders/tiff/libevas_loader_tiff.la
139EVAS_STATIC_LIBADD += @evas_image_loader_tiff_libs@
140endif
141if EVAS_STATIC_BUILD_XPM
142SUBDIRS += ../modules/loaders/xpm
143EVAS_STATIC_MODULE += ../modules/loaders/xpm/libevas_loader_xpm.la
144EVAS_STATIC_LIBADD += @evas_image_loader_xpm_libs@
145endif
146
147
148#if EVAS_STATIC_BUILD_CAIRO_X11
149#SUBDIRS += \
150# ../modules/engines/cairo_common \
151# ../modules/engines/cairo_x11
152#EVAS_STATIC_MODULE += \
153# ../modules/engines/cairo_common/libevas_engine_cairo_common.la \
154# ../modules/engines/cairo_x11/libevas_engine_cairo_x11.la
155#EVAS_STATIC_LIBADD += @CAIRO_CFLAGS@
156#endif
157#if EVAS_STATIC_BUILD_SOFTWARE_QTOPIA
158#SUBDIRS += ../modules/engines/software_qtopia/
159#EVAS_STATIC_MODULE += ../modules/engines/software_qtopia/libevas_engine_software_qtopia.la
160#EVAS_STATIC_LIBADD += @evas_engine_software_qtopia_libs@
161#endif
4 162
5AM_CPPFLAGS = \ 163AM_CPPFLAGS = \
6-I. \ 164-I. \
@@ -45,6 +203,8 @@ engines/common/libevas_engine_common.la \
45@FONTCONFIG_LIBS@ \ 203@FONTCONFIG_LIBS@ \
46@pthread_libs@ \ 204@pthread_libs@ \
47@EINA_LIBS@ \ 205@EINA_LIBS@ \
206$(EVAS_STATIC_MODULE) \
207$(EVAS_STATIC_LIBADD) \
48-lm 208-lm
49 209
50libevas_la_DEPENDENCIES = \ 210libevas_la_DEPENDENCIES = \
@@ -54,7 +214,8 @@ file/libevas_file.la \
54cache/libevas_cache.la \ 214cache/libevas_cache.la \
55imaging/libevas_imaging.la \ 215imaging/libevas_imaging.la \
56$(libevas_cserve_la) \ 216$(libevas_cserve_la) \
57engines/common/libevas_engine_common.la 217engines/common/libevas_engine_common.la \
218$(EVAS_STATIC_MODULE)
58 219
59if BUILD_ENGINE_SOFTWARE_16 220if BUILD_ENGINE_SOFTWARE_16
60 221
diff --git a/legacy/evas/src/lib/canvas/evas_main.c b/legacy/evas/src/lib/canvas/evas_main.c
index 707b39223b..3953f77df7 100644
--- a/legacy/evas/src/lib/canvas/evas_main.c
+++ b/legacy/evas/src/lib/canvas/evas_main.c
@@ -2,7 +2,6 @@
2#include "evas_private.h" 2#include "evas_private.h"
3#include "evas_cs.h" 3#include "evas_cs.h"
4 4
5extern Eina_List *evas_modules;
6static int initcount = 0; 5static int initcount = 0;
7 6
8Eina_Mempool *_evas_rectangle_mp = NULL; 7Eina_Mempool *_evas_rectangle_mp = NULL;
@@ -250,7 +249,6 @@ evas_free(Evas *e)
250EAPI void 249EAPI void
251evas_output_method_set(Evas *e, int render_method) 250evas_output_method_set(Evas *e, int render_method)
252{ 251{
253 Eina_List *l;
254 Evas_Module *em; 252 Evas_Module *em;
255 253
256 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 254 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
@@ -261,27 +259,22 @@ evas_output_method_set(Evas *e, int render_method)
261 if (render_method == RENDER_METHOD_INVALID) return; 259 if (render_method == RENDER_METHOD_INVALID) return;
262 /* if the engine is already set up - abort */ 260 /* if the engine is already set up - abort */
263 if (e->output.render_method != RENDER_METHOD_INVALID) return; 261 if (e->output.render_method != RENDER_METHOD_INVALID) return;
264 /* iterate trough the list to find the id */ 262 /* Request the right engine. */
265 EINA_LIST_FOREACH(evas_modules, l, em) 263 em = evas_module_engine_get(render_method);
266 { 264 if (!em) return ;
267 Evas_Module_Engine *eme; 265 if (em->id_engine != render_method) return;
268 266 if (!evas_module_load(em)) return;
269 if (em->type != EVAS_MODULE_TYPE_ENGINE) continue; 267
270 if (!em->data) continue; 268 /* set the correct render */
271 eme = (Evas_Module_Engine *)em->data; 269 e->output.render_method = render_method;
272 if (eme->id != render_method) continue; 270 e->engine.func = (em->functions);
273 if (!evas_module_load(em)) return; 271 evas_module_use(em);
274 /* set the correct render */ 272 if (e->engine.module) evas_module_unref(e->engine.module);
275 e->output.render_method = render_method; 273 e->engine.module = em;
276 e->engine.func = (em->functions); 274 evas_module_ref(em);
277 evas_module_use(em); 275 /* get the engine info struct */
278 if (e->engine.module) evas_module_unref(e->engine.module); 276 if (e->engine.func->info) e->engine.info = e->engine.func->info(e);
279 e->engine.module = em; 277 return;
280 evas_module_ref(em);
281 /* get the engine info struct */
282 if (e->engine.func->info) e->engine.info = e->engine.func->info(e);
283 return;
284 }
285} 278}
286 279
287/** 280/**
@@ -689,25 +682,14 @@ evas_coord_world_y_to_screen(const Evas *e, Evas_Coord y)
689EAPI int 682EAPI int
690evas_render_method_lookup(const char *name) 683evas_render_method_lookup(const char *name)
691{ 684{
692 static int i = 1;
693 Evas_Module *em; 685 Evas_Module *em;
694 Evas_Module_Engine *eem; 686
695
696 if (!name) return RENDER_METHOD_INVALID; 687 if (!name) return RENDER_METHOD_INVALID;
697 /* search on the engines list for the name */ 688 /* search on the engines list for the name */
698 em = evas_module_find_type(EVAS_MODULE_TYPE_ENGINE, name); 689 em = evas_module_find_type(EVAS_MODULE_TYPE_ENGINE, name);
699
700 if (!em) return RENDER_METHOD_INVALID; 690 if (!em) return RENDER_METHOD_INVALID;
701 691
702 eem = (Evas_Module_Engine *)em->data; 692 return em->id_engine;
703 if (!eem)
704 {
705 eem = malloc(sizeof(Evas_Module_Engine));
706 em->data = eem;
707 eem->id = i;
708 i++;
709 }
710 return eem->id;
711} 693}
712 694
713/** 695/**
@@ -748,58 +730,58 @@ evas_render_method_list(void)
748 730
749 /* FIXME: get from modules - this is currently coded-in */ 731 /* FIXME: get from modules - this is currently coded-in */
750#ifdef BUILD_ENGINE_SOFTWARE_GDI 732#ifdef BUILD_ENGINE_SOFTWARE_GDI
751 methods = eina_list_append(methods, strdup("software_gdi")); 733 methods = eina_list_append(methods, "software_gdi");
752#endif 734#endif
753#ifdef BUILD_ENGINE_SOFTWARE_DDRAW 735#ifdef BUILD_ENGINE_SOFTWARE_DDRAW
754 methods = eina_list_append(methods, strdup("software_ddraw")); 736 methods = eina_list_append(methods, "software_ddraw");
755#endif 737#endif
756#ifdef BUILD_ENGINE_SOFTWARE_16_DDRAW 738#ifdef BUILD_ENGINE_SOFTWARE_16_DDRAW
757 methods = eina_list_append(methods, strdup("software_16_ddraw")); 739 methods = eina_list_append(methods, "software_16_ddraw");
758#endif 740#endif
759#ifdef BUILD_ENGINE_DIRECT3D 741#ifdef BUILD_ENGINE_DIRECT3D
760 methods = eina_list_append(methods, strdup("direct3d")); 742 methods = eina_list_append(methods, "direct3d");
761#endif 743#endif
762#ifdef BUILD_ENGINE_SOFTWARE_16_WINCE 744#ifdef BUILD_ENGINE_SOFTWARE_16_WINCE
763 methods = eina_list_append(methods, strdup("software_16_wince")); 745 methods = eina_list_append(methods, "software_16_wince");
764#endif 746#endif
765#ifdef BUILD_ENGINE_SOFTWARE_X11 747#ifdef BUILD_ENGINE_SOFTWARE_X11
766 methods = eina_list_append(methods, strdup("software_x11")); 748 methods = eina_list_append(methods, "software_x11");
767#endif 749#endif
768#ifdef BUILD_ENGINE_XRENDER_X11 750#ifdef BUILD_ENGINE_XRENDER_X11
769 methods = eina_list_append(methods, strdup("xrender_x11")); 751 methods = eina_list_append(methods, "xrender_x11");
770#endif 752#endif
771#ifdef BUILD_ENGINE_XRENDER_XCB 753#ifdef BUILD_ENGINE_XRENDER_XCB
772 methods = eina_list_append(methods, strdup("xrender_xcb")); 754 methods = eina_list_append(methods, "xrender_xcb");
773#endif 755#endif
774#ifdef BUILD_ENGINE_SOFTWARE_16_X11 756#ifdef BUILD_ENGINE_SOFTWARE_16_X11
775 methods = eina_list_append(methods, strdup("software_16_x11")); 757 methods = eina_list_append(methods, "software_16_x11");
776#endif 758#endif
777#ifdef BUILD_ENGINE_GL_X11 759#ifdef BUILD_ENGINE_GL_X11
778 methods = eina_list_append(methods, strdup("gl_x11")); 760 methods = eina_list_append(methods, "gl_x11");
779#endif 761#endif
780#ifdef BUILD_ENGINE_GL_GLEW 762#ifdef BUILD_ENGINE_GL_GLEW
781 methods = eina_list_append(methods, strdup("gl_glew")); 763 methods = eina_list_append(methods, "gl_glew");
782#endif 764#endif
783#ifdef BUILD_ENGINE_CAIRO_X11 765#ifdef BUILD_ENGINE_CAIRO_X11
784 methods = eina_list_append(methods, strdup("cairo_x11")); 766 methods = eina_list_append(methods, "cairo_x11");
785#endif 767#endif
786#ifdef BUILD_ENGINE_DIRECTFB 768#ifdef BUILD_ENGINE_DIRECTFB
787 methods = eina_list_append(methods, strdup("directfb")); 769 methods = eina_list_append(methods, "directfb");
788#endif 770#endif
789#ifdef BUILD_ENGINE_FB 771#ifdef BUILD_ENGINE_FB
790 methods = eina_list_append(methods, strdup("fb")); 772 methods = eina_list_append(methods, "fb");
791#endif 773#endif
792#ifdef BUILD_ENGINE_BUFFER 774#ifdef BUILD_ENGINE_BUFFER
793 methods = eina_list_append(methods, strdup("buffer")); 775 methods = eina_list_append(methods, "buffer");
794#endif 776#endif
795#ifdef BUILD_ENGINE_SOFTWARE_WIN32_GDI 777#ifdef BUILD_ENGINE_SOFTWARE_WIN32_GDI
796 methods = eina_list_append(methods, strdup("software_win32_gdi")); 778 methods = eina_list_append(methods, "software_win32_gdi");
797#endif 779#endif
798#ifdef BUILD_ENGINE_SOFTWARE_QTOPIA 780#ifdef BUILD_ENGINE_SOFTWARE_QTOPIA
799 methods = eina_list_append(methods, strdup("software_qtopia")); 781 methods = eina_list_append(methods, "software_qtopia");
800#endif 782#endif
801#ifdef BUILD_ENGINE_SOFTWARE_SDL 783#ifdef BUILD_ENGINE_SOFTWARE_SDL
802 methods = eina_list_append(methods, strdup("software_sdl")); 784 methods = eina_list_append(methods, "software_sdl");
803#endif 785#endif
804 786
805 return methods; 787 return methods;
@@ -835,11 +817,7 @@ evas_render_method_list(void)
835EAPI void 817EAPI void
836evas_render_method_list_free(Eina_List *list) 818evas_render_method_list_free(Eina_List *list)
837{ 819{
838 while (list) 820 eina_list_free(list);
839 {
840 free(list->data);
841 list = eina_list_remove(list, list->data);
842 }
843} 821}
844 822
845/** 823/**
diff --git a/legacy/evas/src/lib/engines/common/evas_image_load.c b/legacy/evas/src/lib/engines/common/evas_image_load.c
index d6b1736acd..e65884f4ce 100644
--- a/legacy/evas/src/lib/engines/common/evas_image_load.c
+++ b/legacy/evas/src/lib/engines/common/evas_image_load.c
@@ -6,8 +6,6 @@
6#include "evas_private.h" 6#include "evas_private.h"
7#include "evas_cs.h" 7#include "evas_cs.h"
8 8
9extern Eina_List *evas_modules;
10
11struct ext_loader_s { 9struct ext_loader_s {
12 const char* extention; 10 const char* extention;
13 const char* loader; 11 const char* loader;
@@ -34,12 +32,30 @@ static struct ext_loader_s loaders[] = {
34 { "pnm", "pmaps" } 32 { "pnm", "pmaps" }
35}; 33};
36 34
35static Eina_Bool
36_evas_image_foreach_loader(const Eina_Hash *hash, const char *key, Evas_Module *em, Image_Entry *ie)
37{
38 Evas_Image_Load_Func *evas_image_load_func = NULL;
39
40 if (!evas_module_load(em)) return EINA_TRUE;
41 evas_image_load_func = em->functions;
42 evas_module_use(em);
43 if (evas_image_load_func && evas_image_load_func->file_head(ie, ie->file, ie->key))
44 {
45 ie->info.module = (void*) em;
46 ie->info.loader = (void*) evas_image_load_func;
47 evas_module_ref((Evas_Module*) ie->info.module);
48 return EINA_FALSE;
49 }
50
51 return EINA_TRUE;
52}
53
37EAPI int 54EAPI int
38evas_common_load_rgba_image_module_from_file(Image_Entry *ie) 55evas_common_load_rgba_image_module_from_file(Image_Entry *ie)
39{ 56{
40 Evas_Image_Load_Func *evas_image_load_func = NULL; 57 Evas_Image_Load_Func *evas_image_load_func = NULL;
41 const char *loader = NULL; 58 const char *loader = NULL;
42 Eina_List *l;
43 Evas_Module *em; 59 Evas_Module *em;
44 char *dot; 60 char *dot;
45 int i; 61 int i;
@@ -82,21 +98,9 @@ evas_common_load_rgba_image_module_from_file(Image_Entry *ie)
82 } 98 }
83 } 99 }
84 100
85 EINA_LIST_FOREACH(evas_modules, l, em) 101 /* FIXME: We don't try not loaded module yet, changed behaviour with previous one. */
86 { 102 evas_module_foreach_image_loader(_evas_image_foreach_loader, ie);
87 if (em->type != EVAS_MODULE_TYPE_IMAGE_LOADER) continue; 103 if (ie->info.module) return 0;
88 if (!evas_module_load(em)) continue;
89 evas_image_load_func = em->functions;
90 evas_module_use(em);
91 if (evas_image_load_func && evas_image_load_func->file_head(ie, ie->file, ie->key))
92 {
93 if (evas_modules != l)
94 {
95 evas_modules = eina_list_promote_list(evas_modules, l);
96 }
97 goto ok;
98 }
99 }
100 104
101 return -1; 105 return -1;
102 106
diff --git a/legacy/evas/src/lib/engines/common/evas_image_save.c b/legacy/evas/src/lib/engines/common/evas_image_save.c
index 21d666c070..a2fa3c87a2 100644
--- a/legacy/evas/src/lib/engines/common/evas_image_save.c
+++ b/legacy/evas/src/lib/engines/common/evas_image_save.c
@@ -12,8 +12,6 @@
12#include "evas_private.h" 12#include "evas_private.h"
13 13
14 14
15extern Eina_List *evas_modules;
16
17int 15int
18evas_common_save_image_to_file(RGBA_Image *im, const char *file, const char *key, int quality, int compress) 16evas_common_save_image_to_file(RGBA_Image *im, const char *file, const char *key, int quality, int compress)
19{ 17{
diff --git a/legacy/evas/src/lib/file/evas_module.c b/legacy/evas/src/lib/file/evas_module.c
index 46f60710b5..7bb05f1bd7 100644
--- a/legacy/evas/src/lib/file/evas_module.c
+++ b/legacy/evas/src/lib/file/evas_module.c
@@ -2,35 +2,35 @@
2# define _GNU_SOURCE 2# define _GNU_SOURCE
3#endif 3#endif
4 4
5#include <dirent.h> /* DIR, dirent */ 5#include <string.h>
6#include <dlfcn.h> /* dlopen,dlclose,etc */
7 6
8#include <evas_common.h> 7#include <evas_common.h>
9#include <evas_private.h> 8#include <evas_private.h>
10 9
11Eina_List *evas_modules = NULL; 10static Eina_Hash *evas_modules[4] = {
11 NULL,
12 NULL,
13 NULL,
14 NULL
15};
16
17static Eina_List *eina_evas_modules = NULL;
12static Eina_List *evas_module_paths = NULL; 18static Eina_List *evas_module_paths = NULL;
19static Eina_Array *evas_engines = NULL;
13 20
14static void 21static Eina_List *
15_evas_module_path_append(Evas_Module_Type type, char *path, const char *subdir) 22_evas_module_append(Eina_List *list, char *path)
16{ 23{
17 Evas_Module_Path *mp; 24 if (path)
18 char *buf;
19
20 buf = evas_file_path_join(path, subdir);
21 if (!buf) return;
22 if (evas_file_path_exists(buf))
23 { 25 {
24 mp = malloc(sizeof(Evas_Module_Path)); 26 if (evas_file_path_exists(path))
25 mp->type = type; 27 list = eina_list_append(list, path);
26 mp->path = buf; 28 else
27 evas_module_paths = eina_list_append(evas_module_paths, mp); 29 free(path);
28 } 30 }
29 else 31 return list;
30 free(buf);
31} 32}
32 33
33
34/* this will alloc a list of paths to search for the modules */ 34/* this will alloc a list of paths to search for the modules */
35/* by now these are: */ 35/* by now these are: */
36/* 1. ~/.evas/modules/ */ 36/* 1. ~/.evas/modules/ */
@@ -40,73 +40,21 @@ _evas_module_path_append(Evas_Module_Type type, char *path, const char *subdir)
40void 40void
41evas_module_paths_init(void) 41evas_module_paths_init(void)
42{ 42{
43
44 char *prefix; 43 char *prefix;
45 char *path; 44 char *path;
46 Eina_List *paths = NULL;
47 45
48 /* 1. ~/.evas/modules/ */ 46 /* 1. ~/.evas/modules/ */
49 prefix = getenv("HOME"); 47 path = eina_module_environment_path_get("HOME", "/.evas/modules");
50 if (prefix) 48 evas_module_paths = _evas_module_append(evas_module_paths, path);
51 {
52 path = malloc(strlen(prefix) + 1 + strlen("/.evas/modules"));
53 if (path)
54 {
55 path[0] = 0;
56 strcpy(path, prefix);
57 strcat(path, "/.evas/modules");
58 if (evas_file_path_exists(path))
59 paths = eina_list_append(paths, path);
60 else
61 free(path);
62 }
63 }
64 49
65 /* 2. $(EVAS_MODULE_DIR)/evas/modules/ */ 50 /* 2. $(EVAS_MODULE_DIR)/evas/modules/ */
66 prefix = getenv("EVAS_MODULES_DIR"); 51 path = eina_module_environment_path_get("EVAS_MODULES_DIR", "/evas/modules");
67 if (prefix) 52 evas_module_paths = _evas_module_append(evas_module_paths, path);
68 { 53
69 path = malloc(strlen(prefix) + 1 + strlen("/evas/modules")); 54 /* 3. libevas.so/../evas/modules/ */
70 if (path) 55 path = eina_module_symbol_path_get(evas_module_paths_init, "/evas/modules");
71 { 56 evas_module_paths = _evas_module_append(evas_module_paths, path);
72 path[0] = 0;
73 strcpy(path, prefix);
74 strcat(path, "/evas/modules");
75 if (evas_file_path_exists(path))
76 paths = eina_list_append(paths, path);
77 else
78 free(path);
79 }
80 }
81 57
82#ifdef HAVE_DLADDR
83 {
84 Dl_info evas_dl;
85 /* 3. libevas.so/../evas/modules/ */
86 if (dladdr(evas_module_paths_init, &evas_dl))
87 {
88 int length;
89
90 if (strrchr(evas_dl.dli_fname, '/'))
91 {
92 length = strlen(strrchr(evas_dl.dli_fname, '/'));
93 path = malloc(strlen(evas_dl.dli_fname) - length +
94 strlen("/evas/modules") + 1);
95 if (path)
96 {
97 strncpy(path, evas_dl.dli_fname,
98 strlen(evas_dl.dli_fname) - length);
99 path[strlen(evas_dl.dli_fname) - length] = 0;
100 strcat(path, "/evas/modules");
101 if (evas_file_path_exists(path))
102 paths = eina_list_append(paths, path);
103 else
104 free(path);
105 }
106 }
107 }
108 }
109#else
110 /* 4. PREFIX/evas/modules/ */ 58 /* 4. PREFIX/evas/modules/ */
111 prefix = PACKAGE_LIB_DIR; 59 prefix = PACKAGE_LIB_DIR;
112 path = malloc(strlen(prefix) + 1 + strlen("/evas/modules")); 60 path = malloc(strlen(prefix) + 1 + strlen("/evas/modules"));
@@ -114,187 +62,323 @@ evas_module_paths_init(void)
114 { 62 {
115 strcpy(path, prefix); 63 strcpy(path, prefix);
116 strcat(path, "/evas/modules"); 64 strcat(path, "/evas/modules");
117 if (evas_file_path_exists(path)) 65 evas_module_paths = _evas_module_append(evas_module_paths, path);
118 paths = eina_list_append(paths, path);
119 else
120 free(path);
121 }
122#endif
123
124 /* append all the module types subdirs */
125 while (paths)
126 {
127 /* here must be added all the types of modules and their subdirectory */
128 /* do this on a separate function */
129 /* 1. engines */
130 _evas_module_path_append(EVAS_MODULE_TYPE_ENGINE, paths->data, "engines");
131 _evas_module_path_append(EVAS_MODULE_TYPE_IMAGE_LOADER, paths->data, "loaders");
132 _evas_module_path_append(EVAS_MODULE_TYPE_IMAGE_SAVER, paths->data, "savers");
133 _evas_module_path_append(EVAS_MODULE_TYPE_OBJECT, paths->data, "objects");
134 free(paths->data);
135 paths = eina_list_remove_list(paths, paths);
136 } 66 }
137} 67}
138 68
69#define EVAS_EINA_STATIC_MODULE_DEFINE(Tn, Name) \
70 Eina_Bool evas_##Tn##_##Name##_init(void); \
71 void evas_##Tn##_##Name##_shutdown(void);
72
73#define EVAS_EINA_STATIC_MODULE_USE(Tn, Name) \
74 { evas_##Tn##_##Name##_init, evas_##Tn##_##Name##_shutdown }
75
76EVAS_EINA_STATIC_MODULE_DEFINE(engine, buffer);
77EVAS_EINA_STATIC_MODULE_DEFINE(engine, cairo_x11);
78EVAS_EINA_STATIC_MODULE_DEFINE(engine, direct3d);
79EVAS_EINA_STATIC_MODULE_DEFINE(engine, directfb);
80EVAS_EINA_STATIC_MODULE_DEFINE(engine, fb);
81EVAS_EINA_STATIC_MODULE_DEFINE(engine, gl_glew);
82EVAS_EINA_STATIC_MODULE_DEFINE(engine, gl_x11);
83EVAS_EINA_STATIC_MODULE_DEFINE(engine, quartz);
84EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16);
85EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_ddraw);
86EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_sdl);
87EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_wince);
88EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_x11);
89EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_ddraw);
90EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_gdi);
91EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_generic);
92EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_qtopia);
93EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_sdl);
94EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_x11);
95EVAS_EINA_STATIC_MODULE_DEFINE(engine, xrender_x11);
96EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, xpm);
97EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, tiff);
98EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, svg);
99EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, png);
100EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, pmaps);
101EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, jpeg);
102EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, gif);
103EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, eet);
104EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, edb);
105EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, edb);
106EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, eet);
107EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, jpeg);
108EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, png);
109EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, tiff);
110
111static const struct {
112 Eina_Bool (*init)(void);
113 void (*shutdown)(void);
114} evas_static_module[] = {
115#ifdef EVAS_STATIC_BUILD_BUFFER
116 EVAS_EINA_STATIC_MODULE_USE(engine, buffer),
117#endif
118#ifdef EVAS_STATIC_BUILD_CAIRO_X11
119 EVAS_EINA_STATIC_MODULE_USE(engine, cairo_x11),
120#endif
121#ifdef EVAS_STATIC_BUILD_DIRECT3D
122 EVAS_EINA_STATIC_MODULE_USE(engine, direct3d),
123#endif
124#ifdef EVAS_STATIC_BUILD_DIRECTFB
125 EVAS_EINA_STATIC_MODULE_USE(engine, directfb),
126#endif
127#ifdef EVAS_STATIC_BUILD_FB
128 EVAS_EINA_STATIC_MODULE_USE(engine, fb),
129#endif
130#ifdef EVAS_STATIC_BUILD_GL_GLEW
131 EVAS_EINA_STATIC_MODULE_USE(engine, gl_glew),
132#endif
133#ifdef EVAS_STATIC_BUILD_GL_X11
134 EVAS_EINA_STATIC_MODULE_USE(engine, gl_x11),
135#endif
136#ifdef EVAS_STATIC_BUILD_QUARTZ
137 EVAS_EINA_STATIC_MODULE_USE(engine, quartz),
138#endif
139#ifdef EVAS_STATIC_BUILD_SOFTWARE_16
140 EVAS_EINA_STATIC_MODULE_USE(engine, software_16),
141#endif
142#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW
143 EVAS_EINA_STATIC_MODULE_USE(engine, software_16_ddraw),
144#endif
145#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_SDL
146 EVAS_EINA_STATIC_MODULE_USE(engine, software_16_sdl),
147#endif
148#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_WINCE
149 EVAS_EINA_STATIC_MODULE_USE(engine, software_16_wince),
150#endif
151#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_X11
152 EVAS_EINA_STATIC_MODULE_USE(engine, software_16_x11),
153#endif
154#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW
155 EVAS_EINA_STATIC_MODULE_USE(engine, software_ddraw),
156#endif
157#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_GDI
158 EVAS_EINA_STATIC_MODULE_USE(engine, software_gdi),
159#endif
160#ifdef EVAS_STATIC_BUILD_SOFTWARE_GENERIC
161 EVAS_EINA_STATIC_MODULE_USE(engine, software_generic),
162#endif
163#ifdef EVAS_STATIC_BUILD_SOFTWARE_QTOPIA
164 EVAS_EINA_STATIC_MODULE_USE(engine, software_qtopia),
165#endif
166#ifdef EVAS_STATIC_BUILD_SOFTWARE_SDL
167 EVAS_EINA_STATIC_MODULE_USE(engine, software_sdl),
168#endif
169#ifdef EVAS_STATIC_BUILD_SOFTWARE_X11
170 EVAS_EINA_STATIC_MODULE_USE(engine, software_x11),
171#endif
172#ifdef EVAS_STATIC_BUILD_XRENDER_X11
173 EVAS_EINA_STATIC_MODULE_USE(engine, xrender_x11),
174#endif
175#ifdef EVAS_STATIC_BUILD_XPM
176 EVAS_EINA_STATIC_MODULE_USE(image_loader, xpm),
177#endif
178#ifdef EVAS_STATIC_BUILD_TIFF
179 EVAS_EINA_STATIC_MODULE_USE(image_loader, tiff),
180#endif
181#ifdef EVAS_STATIC_BUILD_SVG
182 EVAS_EINA_STATIC_MODULE_USE(image_loader, svg),
183#endif
184#ifdef EVAS_STATIC_BUILD_PNG
185 EVAS_EINA_STATIC_MODULE_USE(image_loader, png),
186#endif
187#ifdef EVAS_STATIC_BUILD_PMAPS
188 EVAS_EINA_STATIC_MODULE_USE(image_loader, pmaps),
189#endif
190#ifdef EVAS_STATIC_BUILD_JPEG
191 EVAS_EINA_STATIC_MODULE_USE(image_loader, jpeg),
192#endif
193#ifdef EVAS_STATIC_BUILD_GIF
194 EVAS_EINA_STATIC_MODULE_USE(image_loader, gif),
195#endif
196#ifdef EVAS_STATIC_BUILD_EET
197 EVAS_EINA_STATIC_MODULE_USE(image_loader, eet),
198#endif
199#ifdef EVAS_STATIC_BUILD_EDB
200 EVAS_EINA_STATIC_MODULE_USE(image_loader, edb),
201#endif
202#ifdef EVAS_STATIC_BUILD_
203 EVAS_EINA_STATIC_MODULE_USE(image_saver, edb),
204#endif
205#ifdef EVAS_STATIC_BUILD_
206 EVAS_EINA_STATIC_MODULE_USE(image_saver, eet),
207#endif
208#ifdef EVAS_STATIC_BUILD_
209 EVAS_EINA_STATIC_MODULE_USE(image_saver, jpeg),
210#endif
211#ifdef EVAS_STATIC_BUILD_
212 EVAS_EINA_STATIC_MODULE_USE(image_saver, png),
213#endif
214#ifdef EVAS_STATIC_BUILD_
215 EVAS_EINA_STATIC_MODULE_USE(image_saver, tiff),
216#endif
217 { NULL, NULL }
218};
219
139/* this will alloc an Evas_Module struct for each module 220/* this will alloc an Evas_Module struct for each module
140 * it finds on the paths */ 221 * it finds on the paths */
141void 222void
142evas_module_init(void) 223evas_module_init(void)
143{ 224{
144 Eina_List *l; 225 int i;
145 Evas_Module_Path *mp;
146 int new_id_engine = 1;
147 226
148/* printf("[init modules]\n"); */
149 evas_module_paths_init(); 227 evas_module_paths_init();
150 EINA_LIST_FOREACH(evas_module_paths, l, mp)
151 {
152 DIR *dir;
153 struct dirent *de;
154 228
155 if (!(dir = opendir(mp->path))) break; 229 evas_modules[EVAS_MODULE_TYPE_ENGINE] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL);
156/* printf("[evas module] searching modules on %s\n", mp->path); */ 230 evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL);
157 while ((de = readdir(dir))) 231 evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL);
158 { 232 evas_modules[EVAS_MODULE_TYPE_OBJECT] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL);
159 char *buf; 233
160 234 evas_engines = eina_array_new(4);
161 if ((!strcmp(de->d_name, ".")) || (!strcmp(de->d_name, ".."))) 235
162 continue; 236 for (i = 0; evas_static_module[i].init != NULL; ++i)
163 buf = malloc(strlen(mp->path) + 1 + strlen(de->d_name) + 1); 237 evas_static_module[i].init();
164 sprintf(buf, "%s/%s", mp->path, de->d_name); 238}
165 if (evas_file_path_is_dir(buf)) 239
166 { 240Eina_Bool
167 Evas_Module *em; 241evas_module_register(const Evas_Module_Api *module, Evas_Module_Type type)
168 242{
169 em = calloc(1, sizeof(Evas_Module)); 243 Evas_Module *em;
170 if (!em) continue; 244
171 em->name = strdup(de->d_name); 245 if (type < 0 || type > 3) return EINA_FALSE;
172 em->path = strdup(mp->path); 246 if (module->version != EVAS_MODULE_API_VERSION) return EINA_FALSE;
173 em->type = mp->type; 247 if (!module) return EINA_FALSE;
174 em->handle = NULL; 248
175 em->data = NULL; 249 em = eina_hash_find(evas_modules[type], module->name);
176 em->loaded = 0; 250 if (em) return EINA_FALSE;
177#ifdef BUILD_ASYNC_PRELOAD 251
178 LKI(em->lock); 252 em = calloc(1, sizeof (Evas_Module));
179#endif 253 if (!em) return EINA_FALSE;
180//#if defined(BUILD_PTHREAD) && defined(BUILD_ASYNC_PRELOAD) 254
181// pthread_mutex_init(&em->lock, NULL); 255 em->public = module;
182//#endif 256
183 if (em->type == EVAS_MODULE_TYPE_ENGINE) 257 if (type == EVAS_MODULE_TYPE_ENGINE)
184 { 258 {
185 Evas_Module_Engine *eme; 259 eina_array_push(evas_engines, em);
186 260 em->id_engine = eina_array_count_get(evas_engines);
187 eme = malloc(sizeof(Evas_Module_Engine));
188 if (eme)
189 {
190 eme->id = new_id_engine;
191 em->data = eme;
192 new_id_engine++;
193 }
194 }
195 else if (em->type == EVAS_MODULE_TYPE_IMAGE_LOADER)
196 {
197 }
198 else if (em->type == EVAS_MODULE_TYPE_IMAGE_SAVER)
199 {
200 }
201/* printf("[evas module] including module path %s/%s of type %d\n",em->path, em->name, em->type); */
202 evas_modules = eina_list_append(evas_modules, em);
203 }
204 free(buf);
205 }
206 closedir(dir);
207 } 261 }
262
263 eina_hash_direct_add(evas_modules[type], module->name, em);
264
265 return EINA_TRUE;
208} 266}
209 267
268Eina_Bool
269evas_module_unregister(const Evas_Module_Api *module, Evas_Module_Type type)
270{
271 Evas_Module *em;
272
273 if (type < 0 || type > 3) return EINA_FALSE;
274 if (!module) return EINA_FALSE;
275
276 em = eina_hash_find(evas_modules[type], module->name);
277 if (!em || em->public != module) return EINA_FALSE;
278
279 if (type == EVAS_MODULE_TYPE_ENGINE)
280 eina_array_data_set(evas_engines, em->id_engine, NULL);
281
282 eina_hash_del(evas_modules[type], module->name, em);
283 free(em);
284
285 return EINA_TRUE;
286}
287
288#if defined(__CEGCC__) || defined(__MINGW32CE__)
289# define EVAS_MODULE_NAME_IMAGE_SAVER "saver_%s.dll"
290# define EVAS_MODULE_NAME_IMAGE_LOADER "loader_%s.dll"
291# define EVAS_MODULE_NAME_ENGINE "engine_%s.dll"
292# define EVAS_MODULE_NAME_OBJECT "object_%s.dll"
293#elif _WIN32
294# define EVAS_MODULE_NAME_IMAGE_SAVER "module.dll"
295# define EVAS_MODULE_NAME_IMAGE_LOADER "module.dll"
296# define EVAS_MODULE_NAME_ENGINE "module.dll"
297# define EVAS_MODULE_NAME_OBJECT "module.dll"
298#else
299# define EVAS_MODULE_NAME_IMAGE_SAVER "module.so"
300# define EVAS_MODULE_NAME_IMAGE_LOADER "module.so"
301# define EVAS_MODULE_NAME_ENGINE "module.so"
302# define EVAS_MODULE_NAME_OBJECT "module.so"
303#endif
304
210Evas_Module * 305Evas_Module *
211evas_module_find_type(Evas_Module_Type type, const char *name) 306evas_module_find_type(Evas_Module_Type type, const char *name)
212{ 307{
213 Eina_List *l; 308 const char *path;
309 const char *format = NULL;
310 char buffer[4096];
214 Evas_Module *em; 311 Evas_Module *em;
312 Eina_Module *en;
313 Eina_List *l;
314
315 if (type < 0 || type > 3) return NULL;
316
317 em = eina_hash_find(evas_modules[type], name);
318 if (em) return em;
215 319
216 EINA_LIST_FOREACH(evas_modules, l, em) 320 EINA_LIST_FOREACH(evas_module_paths, l, path)
217 { 321 {
218 if ((type == em->type) && (!strcmp(name,em->name))) 322 switch (type)
219 { 323 {
220 if (evas_modules != l) 324 case EVAS_MODULE_TYPE_ENGINE: format = "%s/engines/%s/%s/" EVAS_MODULE_NAME_ENGINE; break;
221 { 325 case EVAS_MODULE_TYPE_IMAGE_LOADER: format = "%s/loaders/%s/%s/" EVAS_MODULE_NAME_IMAGE_LOADER; break;
222 evas_modules = eina_list_promote_list(evas_modules, l); 326 case EVAS_MODULE_TYPE_IMAGE_SAVER: format = "%s/savers/%s/%s/" EVAS_MODULE_NAME_IMAGE_SAVER; break;
223 } 327 case EVAS_MODULE_TYPE_OBJECT: format = "%s/object/%s/%s/" EVAS_MODULE_NAME_OBJECT; break;
328 }
329
330 snprintf(buffer, sizeof (buffer), format, path, name, MODULE_ARCH, name);
331 if (!evas_file_path_is_file(buffer)) continue;
332
333 en = eina_module_new(buffer);
334 if (!en) continue;
335
336 if (!eina_module_load(en))
337 {
338 eina_module_delete(en);
339 continue;
340 }
341
342 em = eina_hash_find(evas_modules[type], name);
343 if (em)
344 {
345 eina_evas_modules = eina_list_append(eina_evas_modules, en);
224 return em; 346 return em;
225 } 347 }
348
349 eina_module_delete(en);
226 } 350 }
351
227 return NULL; 352 return NULL;
228} 353}
229 354
355Evas_Module *
356evas_module_engine_get(int render_method)
357{
358 if (render_method <= 0 || render_method > eina_array_count_get(evas_engines))
359 return NULL;
360 return eina_array_data_get(evas_engines, render_method - 1);
361}
362
363void
364evas_module_foreach_image_loader(Eina_Hash_Foreach cb, const void *fdata)
365{
366 eina_hash_foreach(evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER], cb, fdata);
367}
368
230int 369int
231evas_module_load(Evas_Module *em) 370evas_module_load(Evas_Module *em)
232{ 371{
233 char buf[4096];
234 void *handle;
235
236 if (em->loaded) return 1; 372 if (em->loaded) return 1;
373 if (em->public == NULL) return 0;
237 374
238/* printf("LOAD %s\n", em->name); */ 375 if (!em->public->func.open(em)) return 0;
239#if defined(__CEGCC__) || defined(__MINGW32CE__) 376 em->loaded = 1;
240 switch (em->type) {
241 case EVAS_MODULE_TYPE_IMAGE_SAVER:
242 snprintf(buf, sizeof(buf), "%s/%s/%s/saver_%s.dll", em->path, em->name, MODULE_ARCH, em->name);
243 break;
244 case EVAS_MODULE_TYPE_IMAGE_LOADER:
245 snprintf(buf, sizeof(buf), "%s/%s/%s/loader_%s.dll", em->path, em->name, MODULE_ARCH, em->name);
246 break;
247 case EVAS_MODULE_TYPE_ENGINE:
248 snprintf(buf, sizeof(buf), "%s/%s/%s/engine_%s.dll", em->path, em->name, MODULE_ARCH, em->name);
249 break;
250 default:
251 snprintf(buf, sizeof(buf), "%s/%s/%s/object_%s.dll", em->path, em->name, MODULE_ARCH, em->name);
252 }
253#elif _WIN32
254 snprintf(buf, sizeof(buf), "%s/%s/%s/module.dll", em->path, em->name, MODULE_ARCH);
255#else
256 snprintf(buf, sizeof(buf), "%s/%s/%s/module.so", em->path, em->name, MODULE_ARCH);
257#endif
258 if (!evas_file_path_exists(buf))
259 {
260 printf("[evas module] error loading the module %s. It doesnt exists\n", buf);
261 return 0;
262 }
263 377
264 handle = dlopen(buf, RTLD_LAZY); 378#ifdef BUILD_ASYNC_PRELOAD
265 if (handle) 379 LKI(em->lock);
266 { 380#endif
267 em->handle = handle; 381 return 1;
268 em->func.open = dlsym(em->handle, "module_open");
269 em->func.close = dlsym(em->handle, "module_close");
270 em->api = dlsym(em->handle, "evas_modapi");
271
272 if ((!em->func.open) || (!em->api) || (!em->func.close))
273 goto error_dl;
274 /* check the api */
275 if (em->api->version != EVAS_MODULE_API_VERSION)
276 {
277 printf("[evas module] error loading the modules %s. The version doesnt match\n", buf);
278 goto error_dl;
279 }
280 em->func.open(em);
281 em->loaded = 1;
282 return 1;
283 }
284 error_dl:
285 {
286 const char *err;
287
288 err = dlerror();
289 printf("[evas module] error loading the module %s. %s\n", buf, err);
290 if (handle)
291 dlclose(handle);
292 em->handle = NULL;
293 em->func.open = NULL;
294 em->func.close = NULL;
295 em->api = NULL;
296 }
297 return 0;
298} 382}
299 383
300void 384void
@@ -302,22 +386,15 @@ evas_module_unload(Evas_Module *em)
302{ 386{
303 if (!em->loaded) 387 if (!em->loaded)
304 return; 388 return;
305 if (em->handle) 389 if (em->public == NULL)
306 { 390 return ;
307 em->func.close(em); 391
308 dlclose(em->handle); 392 em->public->func.close(em);
309 }
310 em->handle = NULL;
311 em->func.open = NULL;
312 em->func.close = NULL;
313 em->api = NULL;
314 em->loaded = 0; 393 em->loaded = 0;
315#ifdef BUILD_ASYNC_PRELOAD 394
395#ifdef BUILD_ASYNC_PRELOAD
316 LKD(em->lock); 396 LKD(em->lock);
317#endif 397#endif
318//#if defined(BUILD_PTHREAD) && defined(BUILD_ASYNC_PRELOAD)
319// pthread_mutex_destroy(&em->lock);
320//#endif
321} 398}
322 399
323void 400void
@@ -325,18 +402,11 @@ evas_module_ref(Evas_Module *em)
325{ 402{
326#ifdef BUILD_ASYNC_PRELOAD 403#ifdef BUILD_ASYNC_PRELOAD
327 LKL(em->lock); 404 LKL(em->lock);
328#endif 405#endif
329//#if defined(BUILD_PTHREAD) && defined(BUILD_ASYNC_PRELOAD)
330// pthread_mutex_lock(&em->lock);
331//#endif
332 em->ref++; 406 em->ref++;
333/* printf("M: %s ref++ = %i\n", em->name, em->ref); */
334#ifdef BUILD_ASYNC_PRELOAD 407#ifdef BUILD_ASYNC_PRELOAD
335 LKU(em->lock); 408 LKU(em->lock);
336#endif 409#endif
337//#if defined(BUILD_PTHREAD) && defined(BUILD_ASYNC_PRELOAD)
338// pthread_mutex_unlock(&em->lock);
339//#endif
340} 410}
341 411
342void 412void
@@ -344,18 +414,11 @@ evas_module_unref(Evas_Module *em)
344{ 414{
345#ifdef BUILD_ASYNC_PRELOAD 415#ifdef BUILD_ASYNC_PRELOAD
346 LKL(em->lock); 416 LKL(em->lock);
347#endif 417#endif
348//#if defined(BUILD_PTHREAD) && defined(BUILD_ASYNC_PRELOAD)
349// pthread_mutex_lock(&em->lock);
350//#endif
351 em->ref--; 418 em->ref--;
352/* printf("M: %s ref-- = %i\n", em->name, em->ref); */
353#ifdef BUILD_ASYNC_PRELOAD 419#ifdef BUILD_ASYNC_PRELOAD
354 LKU(em->lock); 420 LKU(em->lock);
355#endif 421#endif
356//#if defined(BUILD_PTHREAD) && defined(BUILD_ASYNC_PRELOAD)
357// pthread_mutex_unlock(&em->lock);
358//#endif
359} 422}
360 423
361static int use_count = 0; 424static int use_count = 0;
@@ -370,10 +433,10 @@ void
370evas_module_clean(void) 433evas_module_clean(void)
371{ 434{
372 static int call_count = 0; 435 static int call_count = 0;
373 int ago; 436/* int ago; */
374 int noclean = -1; 437 int noclean = -1;
375 Eina_List *l; 438/* Eina_List *l; */
376 Evas_Module *em; 439/* Evas_Module *em; */
377 440
378 /* only clean modules every 256 calls */ 441 /* only clean modules every 256 calls */
379 call_count++; 442 call_count++;
@@ -393,64 +456,51 @@ evas_module_clean(void)
393 /* disable module cleaning for now - may cause instability with some modules */ 456 /* disable module cleaning for now - may cause instability with some modules */
394 return; 457 return;
395 458
396 /* incriment use counter = 28bits */ 459 /* FIXME: Don't know what it is supposed to do. */
397 use_count++; 460/* /\* incriment use counter = 28bits *\/ */
398 if (use_count > 0x0fffffff) use_count = 0; 461/* use_count++; */
399 462/* if (use_count > 0x0fffffff) use_count = 0; */
400 /* printf("CLEAN!\n"); */ 463
401 /* go through all modules */ 464/* /\* printf("CLEAN!\n"); *\/ */
402 EINA_LIST_FOREACH(evas_modules, l, em) 465/* /\* go through all modules *\/ */
403 { 466/* EINA_LIST_FOREACH(evas_modules, l, em) */
404 /* printf("M %s %i %i\n", em->name, em->ref, em->loaded); */ 467/* { */
405 /* if the module is refernced - skip */ 468/* /\* printf("M %s %i %i\n", em->name, em->ref, em->loaded); *\/ */
406 if ((em->ref > 0) || (!em->loaded)) continue; 469/* /\* if the module is refernced - skip *\/ */
407 /* how many clean cycles ago was this module last used */ 470/* if ((em->ref > 0) || (!em->loaded)) continue; */
408 ago = use_count - em->last_used; 471/* /\* how many clean cycles ago was this module last used *\/ */
409 if (em->last_used > use_count) ago += 0x10000000; 472/* ago = use_count - em->last_used; */
410 /* if it was used last more than N clean cycles ago - unload */ 473/* if (em->last_used > use_count) ago += 0x10000000; */
411 if (ago > 5) 474/* /\* if it was used last more than N clean cycles ago - unload *\/ */
412 { 475/* if (ago > 5) */
413 /* printf(" UNLOAD %s\n", em->name); */ 476/* { */
414 evas_module_unload(em); 477/* /\* printf(" UNLOAD %s\n", em->name); *\/ */
415 } 478/* evas_module_unload(em); */
416 } 479/* } */
480/* } */
417} 481}
418 482
419/* will dlclose all the modules loaded and free all the structs */ 483/* will dlclose all the modules loaded and free all the structs */
420void 484void
421evas_module_shutdown(void) 485evas_module_shutdown(void)
422{ 486{
423 Evas_Module *em; 487 Eina_Module *en;
488 char *path;
489 int i;
424 490
425/* printf("[shutdown modules]\n"); */ 491 for (i = 0; evas_static_module[i].shutdown != NULL; ++i)
426 while (evas_modules) 492 evas_static_module[i].shutdown();
427 {
428 em = (Evas_Module *)evas_modules->data;
429 evas_module_unload(em);
430 if (em->name) free(em->name);
431 if (em->path) free(em->path);
432 if (em->type == EVAS_MODULE_TYPE_ENGINE)
433 {
434 if (em->data) free(em->data);
435 }
436 else if (em->type == EVAS_MODULE_TYPE_IMAGE_LOADER)
437 {
438 }
439 else if (em->type == EVAS_MODULE_TYPE_IMAGE_SAVER)
440 {
441 }
442 free(evas_modules->data);
443 evas_modules = eina_list_remove_list(evas_modules, evas_modules);
444 }
445 while (evas_module_paths)
446 {
447 Evas_Module_Path *mp;
448 493
449 mp = evas_module_paths->data; 494 EINA_LIST_FREE(eina_evas_modules, en)
450 evas_module_paths = eina_list_remove_list(evas_module_paths, evas_module_paths); 495 eina_module_delete(en);
451 free(mp->path); 496
452 free(mp); 497 eina_hash_free(evas_modules[EVAS_MODULE_TYPE_ENGINE]);
453 } 498 eina_hash_free(evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER]);
499 eina_hash_free(evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER]);
500 eina_hash_free(evas_modules[EVAS_MODULE_TYPE_OBJECT]);
501
502 EINA_LIST_FREE(evas_module_paths, path)
503 free(path);
454} 504}
455 505
456EAPI int 506EAPI int
diff --git a/legacy/evas/src/lib/file/evas_module.h b/legacy/evas/src/lib/file/evas_module.h
index d297fcd036..e853bcaaca 100644
--- a/legacy/evas/src/lib/file/evas_module.h
+++ b/legacy/evas/src/lib/file/evas_module.h
@@ -3,16 +3,16 @@
3 3
4 4
5/* the module api version */ 5/* the module api version */
6#define EVAS_MODULE_API_VERSION 1 6#define EVAS_MODULE_API_VERSION 2
7 7
8 8
9/* the module types */ 9/* the module types */
10typedef enum _Evas_Module_Type 10typedef enum _Evas_Module_Type
11{ 11{
12 EVAS_MODULE_TYPE_ENGINE, 12 EVAS_MODULE_TYPE_ENGINE = 0,
13 EVAS_MODULE_TYPE_IMAGE_LOADER, 13 EVAS_MODULE_TYPE_IMAGE_LOADER = 1,
14 EVAS_MODULE_TYPE_IMAGE_SAVER, 14 EVAS_MODULE_TYPE_IMAGE_SAVER = 2,
15 EVAS_MODULE_TYPE_OBJECT 15 EVAS_MODULE_TYPE_OBJECT = 3
16} Evas_Module_Type; 16} Evas_Module_Type;
17 17
18 18
@@ -20,40 +20,34 @@ typedef struct _Evas_Module_Api Evas_Module_Api;
20typedef struct _Evas_Module Evas_Module; 20typedef struct _Evas_Module Evas_Module;
21typedef struct _Evas_Module_Path Evas_Module_Path; 21typedef struct _Evas_Module_Path Evas_Module_Path;
22typedef struct _Evas_Module_Engine Evas_Module_Engine; 22typedef struct _Evas_Module_Engine Evas_Module_Engine;
23typedef struct _Evas_Module_Public Evas_Module_Public;
23 24
24/* the module api structure, all modules should define this struct */ 25/* the module api structure, all modules should define this struct */
25struct _Evas_Module_Api 26struct _Evas_Module_Api
26{ 27{
27 int version; 28 int version;
28 Evas_Module_Type type;
29 const char *name; 29 const char *name;
30 const char *author; 30 const char *author;
31};
32 31
33/* the module structure */
34struct _Evas_Module
35{
36 Evas_Module_Api *api;
37 void *handle; /* the dlopen handle */
38 char *path; /* the path where this modules is */
39 char *name; /* the name of the dir where this module is */
40 struct 32 struct
41 { 33 {
42 int (*open)(Evas_Module *); 34 int (*open)(Evas_Module *);
43 void (*close)(Evas_Module *); 35 void (*close)(Evas_Module *);
44 } func; 36 } func;
45 void *functions; /* this are the functions exported by the module */ 37};
46 void *data; /* some internal data for the module i.e the id for engines */ 38
39/* the module structure */
40struct _Evas_Module
41{
42 const Evas_Module_Api *public;
47 43
48 Evas_Module_Type type; /* the type detected by the path */ 44 void *functions; /* this are the functions exported by the module */
45 int id_engine; /* some internal data for the module i.e the id for engines */
49 46
50 int ref; /* how many refs */ 47 int ref; /* how many refs */
51 int last_used; /* the cycle count when it was last used */ 48 int last_used; /* the cycle count when it was last used */
52 49
53 LK(lock); 50 LK(lock);
54//#if defined(HAVE_PTHREAD_H) && defined(BUILD_ASYNC_PRELOAD)
55// pthread_mutex_t lock;
56//#endif
57 51
58 unsigned char loaded : 1; 52 unsigned char loaded : 1;
59}; 53};
@@ -68,14 +62,11 @@ struct _Evas_Module_Path
68 char *path; 62 char *path;
69}; 63};
70 64
71struct _Evas_Module_Engine
72{
73 int id;
74};
75
76void evas_module_paths_init (void); 65void evas_module_paths_init (void);
77void evas_module_init (void); 66void evas_module_init (void);
78Evas_Module *evas_module_find_type (Evas_Module_Type type, const char *name); 67Evas_Module *evas_module_find_type (Evas_Module_Type type, const char *name);
68Evas_Module *evas_module_engine_get(int render_method);
69void evas_module_foreach_image_loader(Eina_Hash_Foreach cb, const void *fdata);
79int evas_module_load (Evas_Module *em); 70int evas_module_load (Evas_Module *em);
80void evas_module_unload (Evas_Module *em); 71void evas_module_unload (Evas_Module *em);
81void evas_module_ref (Evas_Module *em); 72void evas_module_ref (Evas_Module *em);
@@ -83,6 +74,21 @@ void evas_module_unref (Evas_Module *em);
83void evas_module_use (Evas_Module *em); 74void evas_module_use (Evas_Module *em);
84void evas_module_clean (void); 75void evas_module_clean (void);
85void evas_module_shutdown (void); 76void evas_module_shutdown (void);
86 77Eina_Bool evas_module_register (const Evas_Module_Api *module, Evas_Module_Type type);
78Eina_Bool evas_module_unregister (const Evas_Module_Api *module, Evas_Module_Type type);
79
80#define EVAS_MODULE_DEFINE(Type, Tn, Name) \
81 Eina_Bool evas_##Tn##_##Name##_init(void) \
82 { \
83 return evas_module_register(&evas_modapi, Type); \
84 } \
85 void evas_##Tn##_##Name##_shutdown(void) \
86 { \
87 evas_module_unregister(&evas_modapi, Type); \
88 }
89
90#define EVAS_EINA_MODULE_DEFINE(Tn, Name) \
91 EINA_MODULE_INIT(evas_##Tn##_##Name##_init); \
92 EINA_MODULE_SHUTDOWN(evas_##Tn##_##Name##_shutdown);
87 93
88#endif /* _EVAS_MODULE_H */ 94#endif /* _EVAS_MODULE_H */
diff --git a/legacy/evas/src/modules/engines/Makefile.am b/legacy/evas/src/modules/engines/Makefile.am
index 3ddd1f3873..7a20c88408 100644
--- a/legacy/evas/src/modules/engines/Makefile.am
+++ b/legacy/evas/src/modules/engines/Makefile.am
@@ -1,25 +1,65 @@
1MAINTAINERCLEANFILES = Makefile.in 1MAINTAINERCLEANFILES = Makefile.in
2 2
3SUBDIRS = \ 3SUBDIRS =
4software_generic \ 4
5buffer \ 5if !EVAS_STATIC_BUILD_SOFTWARE_GENERIC
6directfb \ 6SUBDIRS += software_generic
7fb \ 7endif
8gl_common \ 8if !EVAS_STATIC_BUILD_BUFFER
9gl_x11 \ 9SUBDIRS += buffer
10gl_glew \ 10endif
11software_gdi \ 11if !EVAS_STATIC_BUILD_DIRECT3D
12software_ddraw \ 12SUBDIRS += direct3d
13software_x11 \ 13endif
14xrender_x11 \ 14if !EVAS_STATIC_BUILD_DIRECTFB
15software_sdl \ 15SUBDIRS += directfb
16software_16 \ 16endif
17software_16_x11 \ 17if !EVAS_STATIC_BUILD_FB
18direct3d \ 18SUBDIRS += fb
19software_16_ddraw \ 19endif
20software_16_wince \ 20if !EVAS_STATIC_BUILD_GL_GLEW
21software_16_sdl \ 21SUBDIRS += gl_common gl_glew
22quartz 22endif
23if !EVAS_STATIC_BUILD_GL_X11
24SUBDIRS += gl_common gl_x11
25endif
26if !EVAS_STATIC_BUILD_QUARTZ
27SUBDIRS += quartz
28endif
29if !EVAS_STATIC_BUILD_SOFTWARE_16
30SUBDIRS += software_16
31endif
32if !EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW
33SUBDIRS += software_16_ddraw
34endif
35if !EVAS_STATIC_BUILD_SOFTWARE_16_WINCE
36SUBDIRS += software_16_wince
37endif
38if !EVAS_STATIC_BUILD_SOFTWARE_16_X11
39SUBDIRS += software_16_x11
40endif
41if !EVAS_STATIC_BUILD_SOFTWARE_SDL
42SUBDIRS += software_16_sdl software_sdl
43endif
44if !EVAS_STATIC_BUILD_SOFTWARE_DDRAW
45SUBDIRS += software_ddraw
46endif
47if !EVAS_STATIC_BUILD_SOFTWARE_GDI
48SUBDIRS += software_gdi
49endif
50if !EVAS_STATIC_BUILD_SOFTWARE_X11
51SUBDIRS += software_x11
52endif
53if !EVAS_STATIC_BUILD_XRENDER_X11
54SUBDIRS += xrender_x11
55endif
56
57
58#if !EVAS_STATIC_BUILD_CAIRO_X11
59#SUBDIRS +=
23#cairo_common 60#cairo_common
24#cairo_x11 61#cairo_x11
25#software_qtopia 62#endif
63#if !EVAS_STATIC_BUILD_SOFTWARE_QTOPIA
64#SUBDIRS += software_qtopia
65#endif
diff --git a/legacy/evas/src/modules/engines/buffer/Makefile.am b/legacy/evas/src/modules/engines/buffer/Makefile.am
index 7d9b7c9a9b..371eabd4a0 100644
--- a/legacy/evas/src/modules/engines/buffer/Makefile.am
+++ b/legacy/evas/src/modules/engines/buffer/Makefile.am
@@ -13,20 +13,30 @@ AM_CFLAGS = @WIN32_CFLAGS@
13 13
14if BUILD_ENGINE_BUFFER 14if BUILD_ENGINE_BUFFER
15 15
16BUFFER_SOURCES = \
17evas_engine.c \
18evas_outbuf.c
19
16pkgdir = $(libdir)/evas/modules/engines/buffer/$(MODULE_ARCH) 20pkgdir = $(libdir)/evas/modules/engines/buffer/$(MODULE_ARCH)
17 21
18pkg_LTLIBRARIES = module.la 22include_HEADERS = Evas_Engine_Buffer.h
19 23
20module_la_SOURCES = \ 24if !EVAS_STATIC_BUILD_BUFFER
21evas_engine.c \
22evas_outbuf.c
23 25
26pkg_LTLIBRARIES = module.la
27
28module_la_SOURCES = $(BUFFER_SOURCES)
24module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ 29module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@
25module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version 30module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
26module_la_LIBTOOLFLAGS = --tag=disable-static 31module_la_LIBTOOLFLAGS = --tag=disable-static
27 32
28include_HEADERS = Evas_Engine_Buffer.h 33else
29 34
35noinst_LTLIBRARIES = libevas_engine_buffer.la
36
37libevas_engine_buffer_la_SOURCES = $(BUFFER_SOURCES)
38
39endif
30endif 40endif
31 41
32EXTRA_DIST = evas_engine.h 42EXTRA_DIST = evas_engine.h
diff --git a/legacy/evas/src/modules/engines/buffer/evas_engine.c b/legacy/evas/src/modules/engines/buffer/evas_engine.c
index e5af0ccf6c..5343f1cfed 100644
--- a/legacy/evas/src/modules/engines/buffer/evas_engine.c
+++ b/legacy/evas/src/modules/engines/buffer/evas_engine.c
@@ -323,7 +323,7 @@ eng_output_idle_flush(void *data)
323} 323}
324 324
325/* module advertising code */ 325/* module advertising code */
326EAPI int 326static int
327module_open(Evas_Module *em) 327module_open(Evas_Module *em)
328{ 328{
329 if (!em) return 0; 329 if (!em) return 0;
@@ -351,15 +351,25 @@ module_open(Evas_Module *em)
351 return 1; 351 return 1;
352} 352}
353 353
354EAPI void 354static void
355module_close(void) 355module_close(Evas_Module *em)
356{ 356{
357} 357}
358 358
359EAPI Evas_Module_Api evas_modapi = 359static Evas_Module_Api evas_modapi =
360{ 360{
361 EVAS_MODULE_API_VERSION, 361 EVAS_MODULE_API_VERSION,
362 EVAS_MODULE_TYPE_ENGINE, 362 "buffer",
363 "buffer", 363 "none",
364 "none" 364 {
365 module_open,
366 module_close
367 }
365}; 368};
369
370EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, buffer);
371
372#ifndef EVAS_STATIC_BUILD_BUFFER
373EVAS_EINA_MODULE_DEFINE(engine, buffer);
374#endif
375
diff --git a/legacy/evas/src/modules/engines/cairo_x11/Makefile.am b/legacy/evas/src/modules/engines/cairo_x11/Makefile.am
index e1dcc4d9d5..e861db2d94 100644
--- a/legacy/evas/src/modules/engines/cairo_x11/Makefile.am
+++ b/legacy/evas/src/modules/engines/cairo_x11/Makefile.am
@@ -12,20 +12,34 @@ AM_CPPFLAGS = \
12 12
13if BUILD_ENGINE_CAIRO_X11 13if BUILD_ENGINE_CAIRO_X11
14 14
15CAIRO_X11_SOURCES = \
16evas_engine.c \
17evas_x_main.c
18
19CAIRO_X11_LIBADD = @evas_engine_cairo_x11_libs@ $(top_builddir)/src/modules/engines/cairo_common/libevas_engine_cairo_common.la
20
15pkgdir = $(libdir)/evas/modules/engines/cairo_x11/$(MODULE_ARCH) 21pkgdir = $(libdir)/evas/modules/engines/cairo_x11/$(MODULE_ARCH)
16 22
23include_HEADERS = Evas_Engine_Cairo_X11.h
24
25if !EVAS_STATIC_BUILD_CAIRO_X11
26
17pkg_LTLIBRARIES = module.la 27pkg_LTLIBRARIES = module.la
18 28
19module_la_SOURCES = \ 29module_la_SOURCES = $(CAIRO_X11_SOURCES)
20evas_engine.c \
21evas_x_main.c
22 30
23module_la_LIBADD = @EINA_LIBS@ @evas_engine_cairo_x11_libs@ $(top_builddir)/src/modules/engines/cairo_common/libevas_engine_cairo_common.la $(top_builddir)/src/lib/libevas.la 31module_la_LIBADD = @EINA_LIBS@ $(CAIRO_X11_SOURCES) $(top_builddir)/src/lib/libevas.la
24module_la_LDFLAGS = -module -avoid-version 32module_la_LDFLAGS = -module -avoid-version
25module_la_LIBTOOLFLAGS = --tag=disable-static 33module_la_LIBTOOLFLAGS = --tag=disable-static
26 34
27include_HEADERS = Evas_Engine_Cairo_X11.h 35else
28 36
37noinst_LTLIBRARIES = libevas_engine_cairo_x11.la
38
39libevas_engine_cairo_x11_la_SOURCES = $(CAIRO_X11_SOURCES)
40libevas_engine_cairo_x11_la_LIBADD = $(CAIRO_X11_LIBADD)
41
42endif
29endif 43endif
30 44
31EXTRA_DIST = evas_engine.h 45EXTRA_DIST = evas_engine.h
diff --git a/legacy/evas/src/modules/engines/cairo_x11/evas_engine.c b/legacy/evas/src/modules/engines/cairo_x11/evas_engine.c
index 57c3b9ff42..768cffb9e8 100644
--- a/legacy/evas/src/modules/engines/cairo_x11/evas_engine.c
+++ b/legacy/evas/src/modules/engines/cairo_x11/evas_engine.c
@@ -1478,7 +1478,7 @@ eng_font_hinting_can_hint(void *data, int hinting)
1478 re = (Render_Engine *)data; 1478 re = (Render_Engine *)data;
1479} 1479}
1480 1480
1481EAPI int 1481static int
1482module_open(Evas_Module *em) 1482module_open(Evas_Module *em)
1483{ 1483{
1484 if (!em) return 0; 1484 if (!em) return 0;
@@ -1486,16 +1486,24 @@ module_open(Evas_Module *em)
1486 return 1; 1486 return 1;
1487} 1487}
1488 1488
1489EAPI void 1489static void
1490module_close(void) 1490module_close(Evas_Module *em)
1491{ 1491{
1492
1493} 1492}
1494 1493
1495EAPI Evas_Module_Api evas_modapi = 1494static Evas_Module_Api evas_modapi =
1496{ 1495{
1497 EVAS_MODULE_API_VERSION, 1496 EVAS_MODULE_API_VERSION,
1498 EVAS_MODULE_TYPE_ENGINE, 1497 "cairo_x11",
1499 "cairo_x11", 1498 "none",
1500 "none" 1499 {
1500 module_open,
1501 module_close
1502 }
1501}; 1503};
1504
1505EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, cairo_x11);
1506
1507#ifndef EVAS_STATIC_BUILD_CAIRO_X11
1508EVAS_EINA_MODULE_DEFINE(engine, cairo_x11);
1509#endif
diff --git a/legacy/evas/src/modules/engines/direct3d/Makefile.am b/legacy/evas/src/modules/engines/direct3d/Makefile.am
index fda6fac1b9..26ec71f8e3 100644
--- a/legacy/evas/src/modules/engines/direct3d/Makefile.am
+++ b/legacy/evas/src/modules/engines/direct3d/Makefile.am
@@ -12,10 +12,7 @@ AM_CPPFLAGS = \
12 12
13if BUILD_ENGINE_DIRECT3D 13if BUILD_ENGINE_DIRECT3D
14 14
15pkgdir = $(libdir)/evas/modules/engines/direct3d/$(MODULE_ARCH) 15DIRECT3D_SOURCES = \
16
17pkg_LTLIBRARIES = module.la
18module_la_SOURCES = \
19evas_engine.c \ 16evas_engine.c \
20evas_direct3d_context.cpp \ 17evas_direct3d_context.cpp \
21evas_direct3d_device.cpp \ 18evas_direct3d_device.cpp \
@@ -30,13 +27,29 @@ evas_direct3d_scene.cpp \
30evas_direct3d_shader_pack.cpp \ 27evas_direct3d_shader_pack.cpp \
31evas_direct3d_vertex_buffer_cache.cpp 28evas_direct3d_vertex_buffer_cache.cpp
32 29
30DIRECT3D_LIBADD = @evas_engine_direct3d_libs@
31
32pkgdir = $(libdir)/evas/modules/engines/direct3d/$(MODULE_ARCH)
33
34include_HEADERS = Evas_Engine_Direct3D.h
35
36if !EVAS_STATIC_BUILD_DIRECT3D
37
38pkg_LTLIBRARIES = module.la
39module_la_SOURCES = $(DIRECT3D_SOURCES)
33module_la_CXXFLAGS = -fno-exceptions 40module_la_CXXFLAGS = -fno-exceptions
34module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ @evas_engine_direct3d_libs@ 41module_la_LIBADD = $(top_builddir)/src/lib/libevas.la $(DIRECT3D_LIBADD) @EINA_LIBS@
35module_la_LDFLAGS = -no-undefined -module -avoid-version 42module_la_LDFLAGS = -no-undefined -module -avoid-version
36module_la_LIBTOOLFLAGS = --tag=disable-static 43module_la_LIBTOOLFLAGS = --tag=disable-static
37 44
38include_HEADERS = Evas_Engine_Direct3D.h 45else
39 46
47noinst_LTLIBRARIES = libevas_engine_direct3d.la
48
49libevas_engine_direct3d_la_SOURCES = $(DIRECT3D_SOURCES)
50libevas_engine_direct3d_la_LIBADD = $(DIRECT3D_LIBADD)
51
52endif
40endif 53endif
41 54
42EXTRA_DIST = \ 55EXTRA_DIST = \
diff --git a/legacy/evas/src/modules/engines/direct3d/evas_engine.c b/legacy/evas/src/modules/engines/direct3d/evas_engine.c
index 6ff9021582..736d3b7e96 100644
--- a/legacy/evas/src/modules/engines/direct3d/evas_engine.c
+++ b/legacy/evas/src/modules/engines/direct3d/evas_engine.c
@@ -527,7 +527,7 @@ eng_gradient2_radial_draw(void *data, void *context, void *surface, void *radial
527 527
528 528
529/* module advertising code */ 529/* module advertising code */
530EAPI int 530static int
531module_open(Evas_Module *em) 531module_open(Evas_Module *em)
532{ 532{
533 if (!em) return 0; 533 if (!em) return 0;
@@ -600,15 +600,24 @@ module_open(Evas_Module *em)
600 return 1; 600 return 1;
601} 601}
602 602
603EAPI void 603static void
604module_close(void) 604module_close(Evas_Module *em)
605{ 605{
606} 606}
607 607
608EAPI Evas_Module_Api evas_modapi = 608static Evas_Module_Api evas_modapi =
609{ 609{
610 EVAS_MODULE_API_VERSION, 610 EVAS_MODULE_API_VERSION,
611 EVAS_MODULE_TYPE_ENGINE, 611 "direct3d",
612 "direct3d", 612 "none",
613 "none" 613 {
614 module_open,
615 module_close
616 }
614}; 617};
618
619EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, direct3d);
620
621#ifndef EVAS_STATIC_BUILD_DIRECT3D
622EVAS_EINA_MODULE_DEFINE(engine, direct3d);
623#endif
diff --git a/legacy/evas/src/modules/engines/directfb/Makefile.am b/legacy/evas/src/modules/engines/directfb/Makefile.am
index a6bee077cb..c4b7a5e0c2 100644
--- a/legacy/evas/src/modules/engines/directfb/Makefile.am
+++ b/legacy/evas/src/modules/engines/directfb/Makefile.am
@@ -14,18 +14,31 @@ AM_CFLAGS = @WIN32_CFLAGS@
14 14
15if BUILD_ENGINE_DIRECTFB 15if BUILD_ENGINE_DIRECTFB
16 16
17DIRECTFB_SOURCES = evas_engine.c polygon.c
18DIRECTFB_LIBADD = @evas_engine_directfb_libs@
19
17pkgdir = $(libdir)/evas/modules/engines/directfb/$(MODULE_ARCH) 20pkgdir = $(libdir)/evas/modules/engines/directfb/$(MODULE_ARCH)
18 21
22include_HEADERS = Evas_Engine_DirectFB.h
23
24if !EVAS_STATIC_BUILD_DIRECTFB
25
19pkg_LTLIBRARIES = module.la 26pkg_LTLIBRARIES = module.la
20 27
21module_la_SOURCES = evas_engine.c polygon.c 28module_la_SOURCES = $(DIRECTFB_SOURCES)
22 29
23module_la_LIBADD = @EINA_LIBS@ @evas_engine_directfb_libs@ $(top_builddir)/src/lib/libevas.la 30module_la_LIBADD = @EINA_LIBS@ $(DIRECTFB_LIBADD) $(top_builddir)/src/lib/libevas.la
24module_la_LDFLAGS = -module -avoid-version 31module_la_LDFLAGS = -module -avoid-version
25module_la_LIBTOOLFLAGS = --tag=disable-static 32module_la_LIBTOOLFLAGS = --tag=disable-static
26 33
27include_HEADERS = Evas_Engine_DirectFB.h 34else
35
36noinst_LTLIBRARIES = libevas_engine_directfb.la
28 37
38libevas_engine_directfb_la_SOURCES = $(DIRECTFB_SOURCES)
39libevas_engine_directfb_la_LIBADD = $(DIRECTFB_LIBADD)
40
41endif
29endif 42endif
30 43
31EXTRA_DIST = evas_engine.h 44EXTRA_DIST = evas_engine.h
diff --git a/legacy/evas/src/modules/engines/directfb/evas_engine.c b/legacy/evas/src/modules/engines/directfb/evas_engine.c
index aff909bd10..6a41d78947 100644
--- a/legacy/evas/src/modules/engines/directfb/evas_engine.c
+++ b/legacy/evas/src/modules/engines/directfb/evas_engine.c
@@ -1611,7 +1611,7 @@ evas_engine_dfb_image_scale_hint_get(void *data __UNUSED__, void *image)
1611 return EVAS_IMAGE_SCALE_HINT_NONE; 1611 return EVAS_IMAGE_SCALE_HINT_NONE;
1612} 1612}
1613 1613
1614EAPI int 1614static int
1615module_open(Evas_Module *em) 1615module_open(Evas_Module *em)
1616{ 1616{
1617 if (!em) return 0; 1617 if (!em) return 0;
@@ -1666,15 +1666,24 @@ module_open(Evas_Module *em)
1666 return 1; 1666 return 1;
1667} 1667}
1668 1668
1669EAPI void 1669static void
1670module_close(void) 1670module_close(Evas_Module *em)
1671{ 1671{
1672} 1672}
1673 1673
1674EAPI Evas_Module_Api evas_modapi = 1674static Evas_Module_Api evas_modapi =
1675{ 1675{
1676 EVAS_MODULE_API_VERSION, 1676 EVAS_MODULE_API_VERSION,
1677 EVAS_MODULE_TYPE_ENGINE, 1677 "directfb",
1678 "directfb", 1678 "ProFUSION embedded systems",
1679 "ProFUSION embedded systems" 1679 {
1680 module_open,
1681 module_close
1682 }
1680}; 1683};
1684
1685EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, directfb);
1686
1687#ifndef EVAS_STATIC_BUILD_DIRECTFB
1688EVAS_EINA_MODULE_DEFINE(engine, directfb);
1689#endif
diff --git a/legacy/evas/src/modules/engines/fb/Makefile.am b/legacy/evas/src/modules/engines/fb/Makefile.am
index 327e96faaa..677977387d 100644
--- a/legacy/evas/src/modules/engines/fb/Makefile.am
+++ b/legacy/evas/src/modules/engines/fb/Makefile.am
@@ -12,20 +12,33 @@ AM_CPPFLAGS = \
12 12
13if BUILD_ENGINE_FB 13if BUILD_ENGINE_FB
14 14
15pkgdir = $(libdir)/evas/modules/engines/fb/$(MODULE_ARCH) 15FB_SOURCES = \
16
17pkg_LTLIBRARIES = module.la
18module_la_SOURCES = \
19evas_engine.c \ 16evas_engine.c \
20evas_fb_main.c \ 17evas_fb_main.c \
21evas_outbuf.c 18evas_outbuf.c
22 19
23module_la_LIBADD = @EINA_LIBS@ @evas_engine_fb_libs@ $(top_builddir)/src/lib/libevas.la 20FB_LIBADD = @evas_engine_fb_libs@
21
22pkgdir = $(libdir)/evas/modules/engines/fb/$(MODULE_ARCH)
23
24include_HEADERS = Evas_Engine_FB.h
25
26if !EVAS_STATIC_BUILD_FB
27
28pkg_LTLIBRARIES = module.la
29module_la_SOURCES = $(FB_SOURCES)
30module_la_LIBADD = @EINA_LIBS@ $(FB_LIBADD) $(top_builddir)/src/lib/libevas.la
24module_la_LDFLAGS = -module -avoid-version 31module_la_LDFLAGS = -module -avoid-version
25module_la_LIBTOOLFLAGS = --tag=disable-static 32module_la_LIBTOOLFLAGS = --tag=disable-static
26 33
27include_HEADERS = Evas_Engine_FB.h 34else
28 35
36noinst_LTLIBRARIES = libevas_engine_fb.la
37
38libevas_engine_fb_la_SOURCES = $(FB_SOURCES)
39libevas_engine_fb_la_LIBADD = $(FB_LIBADD)
40
41endif
29endif 42endif
30 43
31EXTRA_DIST = \ 44EXTRA_DIST = \
diff --git a/legacy/evas/src/modules/engines/fb/evas_engine.c b/legacy/evas/src/modules/engines/fb/evas_engine.c
index 3307611be5..58d684b4c2 100644
--- a/legacy/evas/src/modules/engines/fb/evas_engine.c
+++ b/legacy/evas/src/modules/engines/fb/evas_engine.c
@@ -248,7 +248,7 @@ eng_output_idle_flush(void *data)
248} 248}
249 249
250/* module advertising code */ 250/* module advertising code */
251EAPI int 251static int
252module_open(Evas_Module *em) 252module_open(Evas_Module *em)
253{ 253{
254 if (!em) return 0; 254 if (!em) return 0;
@@ -276,15 +276,24 @@ module_open(Evas_Module *em)
276 return 1; 276 return 1;
277} 277}
278 278
279EAPI void 279static void
280module_close(void) 280module_close(Evas_Module *em)
281{ 281{
282} 282}
283 283
284EAPI Evas_Module_Api evas_modapi = 284static Evas_Module_Api evas_modapi =
285{ 285{
286 EVAS_MODULE_API_VERSION, 286 EVAS_MODULE_API_VERSION,
287 EVAS_MODULE_TYPE_ENGINE, 287 "fb",
288 "fb", 288 "none",
289 "none" 289 {
290 module_open,
291 module_close
292 }
290}; 293};
294
295EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, fb);
296
297#ifndef EVAS_STATIC_BUILD_FB
298EVAS_EINA_MODULE_DEFINE(engine, fb);
299#endif
diff --git a/legacy/evas/src/modules/engines/gl_glew/Makefile.am b/legacy/evas/src/modules/engines/gl_glew/Makefile.am
index 1cf4585b6b..47461a4fc4 100644
--- a/legacy/evas/src/modules/engines/gl_glew/Makefile.am
+++ b/legacy/evas/src/modules/engines/gl_glew/Makefile.am
@@ -12,20 +12,33 @@ AM_CPPFLAGS = \
12 12
13if BUILD_ENGINE_GL_GLEW 13if BUILD_ENGINE_GL_GLEW
14 14
15GL_GLEW_SOURCES = \
16evas_engine.c \
17evas_glew_main.c
18
19GL_GLEW_LIBADD = @evas_engine_gl_glew_libs@ $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la
20
15pkgdir = $(libdir)/evas/modules/engines/gl_glew/$(MODULE_ARCH) 21pkgdir = $(libdir)/evas/modules/engines/gl_glew/$(MODULE_ARCH)
16 22
17pkg_LTLIBRARIES = module.la 23include_HEADERS = Evas_Engine_GL_Glew.h
18 24
19module_la_SOURCES = \ 25if !EVAS_STATIC_BUILD_GL_GLEW
20evas_engine.c \ 26
21evas_glew_main.c 27pkg_LTLIBRARIES = module.la
22 28
23module_la_LIBADD = $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la $(top_builddir)/src/lib/libevas.la @evas_engine_gl_glew_libs@ 29module_la_SOURCES = $(GL_GLEW_SOURCES)
30module_la_LIBADD = $(GL_GLEW_LIBADD) $(top_builddir)/src/lib/libevas.la
24module_la_LDFLAGS = -no-undefined -module -avoid-version 31module_la_LDFLAGS = -no-undefined -module -avoid-version
25module_la_LIBTOOLFLAGS = --tag=disable-static 32module_la_LIBTOOLFLAGS = --tag=disable-static
26 33
27include_HEADERS = Evas_Engine_GL_Glew.h 34else
28 35
36noinst_LTLIBRARIES = libevas_engine_gl_glew.la
37
38libevas_engine_gl_glew_la_SOURCES = $(GL_GLEW_SOURCES)
39libevas_engine_gl_glew_la_LIBADD = $(GL_GLEW_LIBADD)
40
41endif
29endif 42endif
30 43
31EXTRA_DIST = evas_engine.h 44EXTRA_DIST = evas_engine.h
diff --git a/legacy/evas/src/modules/engines/gl_glew/evas_engine.c b/legacy/evas/src/modules/engines/gl_glew/evas_engine.c
index c2425766e9..6386e365a6 100644
--- a/legacy/evas/src/modules/engines/gl_glew/evas_engine.c
+++ b/legacy/evas/src/modules/engines/gl_glew/evas_engine.c
@@ -922,8 +922,7 @@ eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y
922 } 922 }
923} 923}
924 924
925 925static int
926EAPI int
927module_open(Evas_Module *em) 926module_open(Evas_Module *em)
928{ 927{
929 if (!em) return 0; 928 if (!em) return 0;
@@ -1004,16 +1003,24 @@ module_open(Evas_Module *em)
1004 return 1; 1003 return 1;
1005} 1004}
1006 1005
1007EAPI void 1006static void
1008module_close(void) 1007module_close(Evas_Module *em)
1009{ 1008{
1010
1011} 1009}
1012 1010
1013EAPI Evas_Module_Api evas_modapi = 1011static Evas_Module_Api evas_modapi =
1014{ 1012{
1015 EVAS_MODULE_API_VERSION, 1013 EVAS_MODULE_API_VERSION,
1016 EVAS_MODULE_TYPE_ENGINE,
1017 "gl_glew", 1014 "gl_glew",
1018 "none" 1015 "none",
1016 {
1017 module_open,
1018 module_close
1019 }
1019}; 1020};
1021
1022EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, gl_glew);
1023
1024#ifndef EVAS_STATIC_BUILD_GL_GLEW
1025EVAS_EINA_MODULE_DEFINE(engine, gl_glew);
1026#endif
diff --git a/legacy/evas/src/modules/engines/gl_x11/Makefile.am b/legacy/evas/src/modules/engines/gl_x11/Makefile.am
index d69f6bf183..01bf394284 100644
--- a/legacy/evas/src/modules/engines/gl_x11/Makefile.am
+++ b/legacy/evas/src/modules/engines/gl_x11/Makefile.am
@@ -12,20 +12,33 @@ AM_CPPFLAGS = \
12 12
13if BUILD_ENGINE_GL_X11 13if BUILD_ENGINE_GL_X11
14 14
15GL_X11_SOURCES = \
16evas_engine.c \
17evas_x_main.c
18
19GL_X11_LIBADD = @evas_engine_gl_x11_libs@ $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la
20
15pkgdir = $(libdir)/evas/modules/engines/gl_x11/$(MODULE_ARCH) 21pkgdir = $(libdir)/evas/modules/engines/gl_x11/$(MODULE_ARCH)
16 22
17pkg_LTLIBRARIES = module.la 23include_HEADERS = Evas_Engine_GL_X11.h
18 24
19module_la_SOURCES = \ 25if !EVAS_STATIC_BUILD_GL_X11
20evas_engine.c \ 26
21evas_x_main.c 27pkg_LTLIBRARIES = module.la
22 28
23module_la_LIBADD = @EINA_LIBS@ @evas_engine_gl_x11_libs@ $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la $(top_builddir)/src/lib/libevas.la 29module_la_SOURCES = $(GL_X11_SOURCES)
30module_la_LIBADD = @EINA_LIBS@ $(GL_X11_LIBADD) $(top_builddir)/src/lib/libevas.la
24module_la_LDFLAGS = -module -avoid-version 31module_la_LDFLAGS = -module -avoid-version
25module_la_LIBTOOLFLAGS = --tag=disable-static 32module_la_LIBTOOLFLAGS = --tag=disable-static
26 33
27include_HEADERS = Evas_Engine_GL_X11.h 34else
28 35
36noinst_LTLIBRARIES = libevas_engine_gl_x11.la
37
38libevas_engine_gl_x11_la_SOURCES = $(GL_X11_SOURCES)
39libevas_engine_gl_x11_la_LIBADD = $(GL_X11_LIBADD)
40
41endif
29endif 42endif
30 43
31EXTRA_DIST = evas_engine.h 44EXTRA_DIST = evas_engine.h
diff --git a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
index 8934e2d01e..8eb5576966 100644
--- a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
+++ b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
@@ -1086,7 +1086,7 @@ eng_best_depth_get(Display *disp, int screen)
1086 return _evas_gl_x11_vi->depth; 1086 return _evas_gl_x11_vi->depth;
1087} 1087}
1088 1088
1089EAPI int 1089static int
1090module_open(Evas_Module *em) 1090module_open(Evas_Module *em)
1091{ 1091{
1092 if (!em) return 0; 1092 if (!em) return 0;
@@ -1189,16 +1189,24 @@ module_open(Evas_Module *em)
1189 return 1; 1189 return 1;
1190} 1190}
1191 1191
1192EAPI void 1192static void
1193module_close(void) 1193module_close(Evas_Module *em)
1194{ 1194{
1195
1196} 1195}
1197 1196
1198EAPI Evas_Module_Api evas_modapi = 1197static Evas_Module_Api evas_modapi =
1199{ 1198{
1200 EVAS_MODULE_API_VERSION, 1199 EVAS_MODULE_API_VERSION,
1201 EVAS_MODULE_TYPE_ENGINE, 1200 "gl_x11",
1202 "gl_x11", 1201 "none",
1203 "none" 1202 {
1203 module_open,
1204 module_close
1205 }
1204}; 1206};
1207
1208EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, gl_x11);
1209
1210#ifndef EVAS_STATIC_BUILD_GL_X11
1211EVAS_EINA_MODULE_DEFINE(engine, gl_x11);
1212#endif
diff --git a/legacy/evas/src/modules/engines/quartz/Makefile.am b/legacy/evas/src/modules/engines/quartz/Makefile.am
index fd5926039d..597e45498a 100644
--- a/legacy/evas/src/modules/engines/quartz/Makefile.am
+++ b/legacy/evas/src/modules/engines/quartz/Makefile.am
@@ -11,18 +11,30 @@ AM_CPPFLAGS = \
11 11
12if BUILD_ENGINE_QUARTZ 12if BUILD_ENGINE_QUARTZ
13 13
14QUARTZ_SOURCES = evas_engine.c
15QUARTZ_LIBADD = @evas_engine_quartz_libs@
16
14pkgdir = $(libdir)/evas/modules/engines/quartz/$(MODULE_ARCH) 17pkgdir = $(libdir)/evas/modules/engines/quartz/$(MODULE_ARCH)
15 18
16pkg_LTLIBRARIES = module.la 19include_HEADERS = Evas_Engine_Quartz.h
17 20
18module_la_SOURCES = evas_engine.c 21if !EVAS_STATIC_BUILD_QUARTZ
22
23pkg_LTLIBRARIES = module.la
19 24
20module_la_LIBADD = @EINA_LIBS@ @evas_engine_quartz_libs@ $(top_builddir)/src/lib/libevas.la 25module_la_SOURCES = $(QUARTZ_SOURCES)
26module_la_LIBADD = @EINA_LIBS@ $(QUARTZ_LIBADD) $(top_builddir)/src/lib/libevas.la
21module_la_LDFLAGS = -module -avoid-version 27module_la_LDFLAGS = -module -avoid-version
22module_la_LIBTOOLFLAGS = --tag=disable-static 28module_la_LIBTOOLFLAGS = --tag=disable-static
23 29
24include_HEADERS = Evas_Engine_Quartz.h 30else
31
32noinst_LTLIBRARIES = libevas_engine_quartz.la
25 33
34libevas_engine_quartz_la_SOURCES = $(QUARTZ_SOURCES)
35libevas_engine_quartz_la_LIBADD = $(QUARTZ_LIBADD)
36
37endif
26endif 38endif
27 39
28EXTRA_DIST = \ 40EXTRA_DIST = \
diff --git a/legacy/evas/src/modules/engines/quartz/evas_engine.c b/legacy/evas/src/modules/engines/quartz/evas_engine.c
index 4dc9d80d21..56377027f8 100644
--- a/legacy/evas/src/modules/engines/quartz/evas_engine.c
+++ b/legacy/evas/src/modules/engines/quartz/evas_engine.c
@@ -1412,7 +1412,7 @@ eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y
1412 1412
1413#pragma mark Module Function Export 1413#pragma mark Module Function Export
1414 1414
1415EAPI int 1415static int
1416module_open(Evas_Module *em) 1416module_open(Evas_Module *em)
1417{ 1417{
1418 if (!em) return 0; 1418 if (!em) return 0;
@@ -1511,16 +1511,25 @@ module_open(Evas_Module *em)
1511 return 1; 1511 return 1;
1512} 1512}
1513 1513
1514EAPI void 1514static void
1515module_close(void) 1515module_close(Evas_Module *em)
1516{ 1516{
1517 1517
1518} 1518}
1519 1519
1520EAPI Evas_Module_Api evas_modapi = 1520static Evas_Module_Api evas_modapi =
1521{ 1521{
1522 EVAS_MODULE_API_VERSION, 1522 EVAS_MODULE_API_VERSION,
1523 EVAS_MODULE_TYPE_ENGINE, 1523 "quartz",
1524 "quartz", 1524 "none",
1525 "none" 1525 {
1526 module_open,
1527 module_close
1528 }
1526}; 1529};
1530
1531EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, quartz);
1532
1533#ifndef EVAS_STATIC_BUILD_QUARTZ
1534EVAS_EINA_MODULE_DEFINE(engine, quartz);
1535#endif
diff --git a/legacy/evas/src/modules/engines/software_16/Makefile.am b/legacy/evas/src/modules/engines/software_16/Makefile.am
index 61dd4b6f8e..47eaf100ce 100644
--- a/legacy/evas/src/modules/engines/software_16/Makefile.am
+++ b/legacy/evas/src/modules/engines/software_16/Makefile.am
@@ -13,14 +13,26 @@ AM_CFLAGS = @WIN32_CFLAGS@
13 13
14if BUILD_ENGINE_SOFTWARE_16 14if BUILD_ENGINE_SOFTWARE_16
15 15
16SOFTWARE_16_SOURCES = evas_engine.c
17
16pkgdir = $(libdir)/evas/modules/engines/software_16/$(MODULE_ARCH) 18pkgdir = $(libdir)/evas/modules/engines/software_16/$(MODULE_ARCH)
17 19
18pkg_LTLIBRARIES = module.la 20if !EVAS_STATIC_BUILD_SOFTWARE_16
19module_la_SOURCES = \
20evas_engine.c
21 21
22pkg_LTLIBRARIES = module.la
23module_la_SOURCES = $(SOFTWARE_16_SOURCES)
22module_la_LIBADD = @EINA_LIBS@ $(top_builddir)/src/lib/libevas.la 24module_la_LIBADD = @EINA_LIBS@ $(top_builddir)/src/lib/libevas.la
23module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version 25module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
24module_la_LIBTOOLFLAGS = --tag=disable-static 26module_la_LIBTOOLFLAGS = --tag=disable-static
25 27
28else
29
30noinst_LTLIBRARIES = libevas_engine_software_16.la
31
32libevas_engine_software_16_la_SOURCES = $(SOFTWARE_16_SOURCES)
33
34endif
26endif 35endif
36
37EXTRA_DIST = \
38evas_engine.c
diff --git a/legacy/evas/src/modules/engines/software_16/evas_engine.c b/legacy/evas/src/modules/engines/software_16/evas_engine.c
index 30e6758e26..19f1dd3b62 100644
--- a/legacy/evas/src/modules/engines/software_16/evas_engine.c
+++ b/legacy/evas/src/modules/engines/software_16/evas_engine.c
@@ -984,7 +984,7 @@ static Evas_Func func =
984 ***** 984 *****
985 */ 985 */
986 986
987EAPI int 987static int
988module_open(Evas_Module *em) 988module_open(Evas_Module *em)
989{ 989{
990 if (!em) return 0; 990 if (!em) return 0;
@@ -992,15 +992,24 @@ module_open(Evas_Module *em)
992 return 1; 992 return 1;
993} 993}
994 994
995EAPI void 995static void
996module_close(void) 996module_close(Evas_Module *em)
997{ 997{
998} 998}
999 999
1000EAPI Evas_Module_Api evas_modapi = 1000static Evas_Module_Api evas_modapi =
1001{ 1001{
1002 EVAS_MODULE_API_VERSION, 1002 EVAS_MODULE_API_VERSION,
1003 EVAS_MODULE_TYPE_ENGINE,
1004 "software_16", 1003 "software_16",
1005 "none" 1004 "none",
1005 {
1006 module_open,
1007 module_close
1008 }
1006}; 1009};
1010
1011EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_16);
1012
1013#ifndef EVAS_STATIC_BUILD_SOFTWARE_16
1014EVAS_EINA_MODULE_DEFINE(engine, software_16);
1015#endif
diff --git a/legacy/evas/src/modules/engines/software_16_ddraw/Makefile.am b/legacy/evas/src/modules/engines/software_16_ddraw/Makefile.am
index fa1f766917..f752ab7ea1 100644
--- a/legacy/evas/src/modules/engines/software_16_ddraw/Makefile.am
+++ b/legacy/evas/src/modules/engines/software_16_ddraw/Makefile.am
@@ -13,22 +13,35 @@ AM_CPPFLAGS = \
13 13
14if BUILD_ENGINE_SOFTWARE_16_DDRAW 14if BUILD_ENGINE_SOFTWARE_16_DDRAW
15 15
16pkgdir = $(libdir)/evas/modules/engines/software_16_ddraw/$(MODULE_ARCH) 16SOFTWARE_16_DDRAW_SOURCES = \
17
18pkg_LTLIBRARIES = module.la
19
20module_la_SOURCES = \
21evas_engine.c \ 17evas_engine.c \
22evas_ddraw_buffer.cpp \ 18evas_ddraw_buffer.cpp \
23evas_ddraw_main.cpp 19evas_ddraw_main.cpp
24 20
21SOFTWARE_16_DDRAW_LIBADD = @evas_engine_software_16_ddraw_libs@
22
23pkgdir = $(libdir)/evas/modules/engines/software_16_ddraw/$(MODULE_ARCH)
24
25include_HEADERS = Evas_Engine_Software_16_DDraw.h
26
27if !EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW
28
29pkg_LTLIBRARIES = module.la
30
31module_la_SOURCES = $(SOFTWARE_16_DDRAW_SOURCES)
25module_la_CXXFLAGS = -fno-rtti -fno-exceptions 32module_la_CXXFLAGS = -fno-rtti -fno-exceptions
26module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ @evas_engine_software_16_ddraw_libs@ 33module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ $(SOFTWARE_16_DDRAW_LIBADD)
27module_la_LDFLAGS = -no-undefined -module -avoid-version 34module_la_LDFLAGS = -no-undefined -module -avoid-version
28module_la_LIBTOOLFLAGS = --tag=disable-static 35module_la_LIBTOOLFLAGS = --tag=disable-static
29 36
30include_HEADERS = Evas_Engine_Software_16_DDraw.h 37else
38
39noinst_LTLIBRARIES = libevas_engine_software_16_ddraw.la
31 40
41libevas_engine_software_16_ddraw_la_SOURCES = $(SOFTWARE_16_DDRAW_SOURCES)
42libevas_engine_software_16_ddraw_la_LIBADD = $(SOFTWARE_16_DDRAW_LIBADD)
43
44endif
32endif 45endif
33 46
34EXTRA_DIST = evas_engine.h 47EXTRA_DIST = evas_engine.h
diff --git a/legacy/evas/src/modules/engines/software_16_ddraw/evas_engine.c b/legacy/evas/src/modules/engines/software_16_ddraw/evas_engine.c
index 048f46bc71..61776d13b1 100644
--- a/legacy/evas/src/modules/engines/software_16_ddraw/evas_engine.c
+++ b/legacy/evas/src/modules/engines/software_16_ddraw/evas_engine.c
@@ -564,7 +564,7 @@ eng_output_idle_flush(void *data)
564 564
565 565
566/* module advertising code */ 566/* module advertising code */
567EAPI int 567static int
568module_open(Evas_Module *em) 568module_open(Evas_Module *em)
569{ 569{
570 if (!em) return 0; 570 if (!em) return 0;
@@ -592,15 +592,24 @@ module_open(Evas_Module *em)
592 return 1; 592 return 1;
593} 593}
594 594
595EAPI void 595static void
596module_close(void) 596module_close(Evas_Module *em)
597{ 597{
598} 598}
599 599
600EAPI Evas_Module_Api evas_modapi = 600static Evas_Module_Api evas_modapi =
601{ 601{
602 EVAS_MODULE_API_VERSION, 602 EVAS_MODULE_API_VERSION,
603 EVAS_MODULE_TYPE_ENGINE, 603 "software_16_ddraw",
604 "software_16_ddraw", 604 "none",
605 "none" 605 {
606 module_open,
607 module_close
608 }
606}; 609};
610
611EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_16_ddraw);
612
613#ifndef EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW
614EVAS_EINA_MODULE_DEFINE(engine, software_16_ddraw);
615#endif
diff --git a/legacy/evas/src/modules/engines/software_16_sdl/Makefile.am b/legacy/evas/src/modules/engines/software_16_sdl/Makefile.am
index a00ce3c7cd..75ee7091f5 100644
--- a/legacy/evas/src/modules/engines/software_16_sdl/Makefile.am
+++ b/legacy/evas/src/modules/engines/software_16_sdl/Makefile.am
@@ -6,19 +6,31 @@ INCLUDES = -I. -I$(top_srcdir)/src/lib -I$(top_srcdir)/src/lib/include @FREETYPE
6 6
7if BUILD_ENGINE_SOFTWARE_SDL 7if BUILD_ENGINE_SOFTWARE_SDL
8 8
9SOFTWARE_SDL_SOURCES = \
10evas_engine.c \
11evas_engine.h
12
9pkgdir = $(libdir)/evas/modules/engines/software_16_sdl/$(MODULE_ARCH) 13pkgdir = $(libdir)/evas/modules/engines/software_16_sdl/$(MODULE_ARCH)
10 14
15include_HEADERS = Evas_Engine_SDL_16.h
16
17if !EVAS_STATIC_BUILD_SOFTWARE_SDL
18
11pkg_LTLIBRARIES = module.la 19pkg_LTLIBRARIES = module.la
12 20
13module_la_SOURCES = \ 21module_la_SOURCES = $(SOFTWARE_SDL_SOURCES)
14evas_engine.c \
15evas_engine.h
16 22
17module_la_LIBADD = @EINA_LIBS@ @SDL_LIBS@ $(top_builddir)/src/lib/libevas.la 23module_la_LIBADD = @EINA_LIBS@ @SDL_LIBS@ $(top_builddir)/src/lib/libevas.la
18module_la_LDFLAGS = -no-undefined -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs 24module_la_LDFLAGS = -no-undefined -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
19 25
20include_HEADERS = Evas_Engine_SDL_16.h 26else
21 27
28noinst_LTLIBRARIES = libevas_engine_software_16_sdl.la
29
30libevas_engine_software_16_sdl_la_SOURCES = $(SOFTWARE_SDL_SOURCES)
31libevas_engine_software_16_sdl_la_LIBADD = @SDL_LIBS@
32
33endif
22endif 34endif
23 35
24EXTRA_DIST = \ 36EXTRA_DIST = \
diff --git a/legacy/evas/src/modules/engines/software_16_sdl/evas_engine.c b/legacy/evas/src/modules/engines/software_16_sdl/evas_engine.c
index 334172005b..1f57ce5808 100644
--- a/legacy/evas/src/modules/engines/software_16_sdl/evas_engine.c
+++ b/legacy/evas/src/modules/engines/software_16_sdl/evas_engine.c
@@ -1019,7 +1019,7 @@ evas_engine_sdl16_image_stride_get(void *data __UNUSED__, void *image, int *stri
1019} 1019}
1020 1020
1021/* module advertising code */ 1021/* module advertising code */
1022EAPI int 1022static int
1023module_open(Evas_Module *em) 1023module_open(Evas_Module *em)
1024{ 1024{
1025 if (!em) return 0; 1025 if (!em) return 0;
@@ -1079,19 +1079,28 @@ module_open(Evas_Module *em)
1079 return 1; 1079 return 1;
1080} 1080}
1081 1081
1082EAPI void 1082static void
1083module_close(void) 1083module_close(Evas_Module *em)
1084{ 1084{
1085} 1085}
1086 1086
1087EAPI Evas_Module_Api evas_modapi = 1087static Evas_Module_Api evas_modapi =
1088{ 1088{
1089 EVAS_MODULE_API_VERSION, 1089 EVAS_MODULE_API_VERSION,
1090 EVAS_MODULE_TYPE_ENGINE, 1090 "software_16_sdl",
1091 "software_16_sdl", 1091 "none",
1092 "none" 1092 {
1093 module_open,
1094 module_close
1095 }
1093}; 1096};
1094 1097
1098EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_16_sdl);
1099
1100#ifndef EVAS_STATIC_BUILD_SOFTWARE_SDL
1101EVAS_EINA_MODULE_DEFINE(engine, software_16_sdl);
1102#endif
1103
1095static Engine_Image_Entry* 1104static Engine_Image_Entry*
1096_sdl16_image_alloc(void) 1105_sdl16_image_alloc(void)
1097{ 1106{
diff --git a/legacy/evas/src/modules/engines/software_16_wince/Makefile.am b/legacy/evas/src/modules/engines/software_16_wince/Makefile.am
index 69de313b3e..4557d734ec 100644
--- a/legacy/evas/src/modules/engines/software_16_wince/Makefile.am
+++ b/legacy/evas/src/modules/engines/software_16_wince/Makefile.am
@@ -16,11 +16,7 @@ AM_CPPFLAGS = \
16 16
17if BUILD_ENGINE_SOFTWARE_16_WINCE 17if BUILD_ENGINE_SOFTWARE_16_WINCE
18 18
19pkgdir = $(libdir)/evas/modules/engines/software_16_wince/$(MODULE_ARCH) 19SOFTWARE_16_WINCE_SOURCE = \
20
21pkg_LTLIBRARIES = module.la
22
23module_la_SOURCES = \
24evas_engine.c \ 20evas_engine.c \
25evas_wince_ddraw_buffer.cpp \ 21evas_wince_ddraw_buffer.cpp \
26evas_wince_fb_buffer.c \ 22evas_wince_fb_buffer.c \
@@ -28,14 +24,31 @@ evas_wince_gapi_buffer.c \
28evas_wince_gdi_buffer.c \ 24evas_wince_gdi_buffer.c \
29evas_wince_gapi.rc 25evas_wince_gapi.rc
30 26
27SOFTWARE_16_WINCE_LIBADD = @evas_engine_software_16_wince_libs@
28
29pkgdir = $(libdir)/evas/modules/engines/software_16_wince/$(MODULE_ARCH)
30
31include_HEADERS = Evas_Engine_Software_16_WinCE.h
32
33if !EVAS_STATIC_BUILD_SOFTWARE_16_WINCE
34
35pkg_LTLIBRARIES = module.la
36
37module_la_SOURCES = $(SOFTWARE_16_WINCE_SOURCE)
31module_la_CFLAGS = @WIN32_CFLAGS@ 38module_la_CFLAGS = @WIN32_CFLAGS@
32module_la_CXXFLAGS = -fno-rtti -fno-exceptions 39module_la_CXXFLAGS = -fno-rtti -fno-exceptions
33module_la_LIBADD = @EINA_LIBS@ $(top_builddir)/src/lib/libevas.la @evas_engine_software_16_wince_libs@ 40module_la_LIBADD = @EINA_LIBS@ $(top_builddir)/src/lib/libevas.la $(SOFTWARE_16_WINCE_LIBADD)
34module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version 41module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
35module_la_LIBTOOLFLAGS = --tag=disable-static 42module_la_LIBTOOLFLAGS = --tag=disable-static
36 43
37include_HEADERS = Evas_Engine_Software_16_WinCE.h 44else
45
46noinst_LTLIBRARIES = libevas_engine_software_16_wince.la
38 47
48libevas_engine_software_16_wince_la_SOURCES = $(SOFTWARE_16_WINCE_SOURCE)
49libevas_engine_software_16_wince_la_LIBADD = $(SOFTWARE_16_WINCE_LIBADD)
50
51endif
39endif 52endif
40 53
41EXTRA_DIST = evas_engine.h 54EXTRA_DIST = evas_engine.h
diff --git a/legacy/evas/src/modules/engines/software_16_wince/evas_engine.c b/legacy/evas/src/modules/engines/software_16_wince/evas_engine.c
index c8412b293a..1bfc4d6f1e 100644
--- a/legacy/evas/src/modules/engines/software_16_wince/evas_engine.c
+++ b/legacy/evas/src/modules/engines/software_16_wince/evas_engine.c
@@ -705,7 +705,7 @@ eng_output_idle_flush(void *data)
705 705
706 706
707/* module advertising code */ 707/* module advertising code */
708EAPI int 708static int
709module_open(Evas_Module *em) 709module_open(Evas_Module *em)
710{ 710{
711 if (!em) return 0; 711 if (!em) return 0;
@@ -733,15 +733,24 @@ module_open(Evas_Module *em)
733 return 1; 733 return 1;
734} 734}
735 735
736EAPI void 736static void
737module_close(void) 737module_close(Evas_Module *em)
738{ 738{
739} 739}
740 740
741EAPI Evas_Module_Api evas_modapi = 741static Evas_Module_Api evas_modapi =
742{ 742{
743 EVAS_MODULE_API_VERSION, 743 EVAS_MODULE_API_VERSION,
744 EVAS_MODULE_TYPE_ENGINE,
745 "software_16_wince_fb", 744 "software_16_wince_fb",
746 "none" 745 "none",
746 {
747 module_open,
748 module_close
749 }
747}; 750};
751
752EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_16_wince_fb);
753
754#ifndef EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_FB
755EVAS_EINA_MODULE_DEFINE(engine, software_16_wince_fb);
756#endif
diff --git a/legacy/evas/src/modules/engines/software_16_x11/Makefile.am b/legacy/evas/src/modules/engines/software_16_x11/Makefile.am
index 8a44b65766..45106ed34b 100644
--- a/legacy/evas/src/modules/engines/software_16_x11/Makefile.am
+++ b/legacy/evas/src/modules/engines/software_16_x11/Makefile.am
@@ -13,20 +13,33 @@ AM_CPPFLAGS = \
13 13
14if BUILD_ENGINE_SOFTWARE_16_X11 14if BUILD_ENGINE_SOFTWARE_16_X11
15 15
16SOFTWARE_16_X11_SOURCES = \
17evas_engine.c \
18evas_x_buffer.c
19
20SOFTWARE_16_X11_LIBADD = @evas_engine_software_16_x11_libs@
21
16pkgdir = $(libdir)/evas/modules/engines/software_16_x11/$(MODULE_ARCH) 22pkgdir = $(libdir)/evas/modules/engines/software_16_x11/$(MODULE_ARCH)
17 23
18pkg_LTLIBRARIES = module.la 24include_HEADERS = Evas_Engine_Software_16_X11.h
19 25
20module_la_SOURCES = \ 26if !EVAS_STATIC_BUILD_SOFTWARE_16_X11
21evas_engine.c \ 27
22evas_x_buffer.c 28pkg_LTLIBRARIES = module.la
23 29
24module_la_LIBADD = @EINA_LIBS@ @evas_engine_software_16_x11_libs@ $(top_builddir)/src/lib/libevas.la 30module_la_SOURCES = $(SOFTWARE_16_X11_SOURCES)
31module_la_LIBADD = @EINA_LIBS@ $(SOFTWARE_16_X11_LIBADD) $(top_builddir)/src/lib/libevas.la
25module_la_LDFLAGS = -no-undefined -module -avoid-version 32module_la_LDFLAGS = -no-undefined -module -avoid-version
26module_la_LIBTOOLFLAGS = --tag=disable-static 33module_la_LIBTOOLFLAGS = --tag=disable-static
27 34
28include_HEADERS = Evas_Engine_Software_16_X11.h 35else
29 36
37noinst_LTLIBRARIES = libevas_engine_software_16_x11.la
38
39libevas_engine_software_16_x11_la_SOURCES = $(SOFTWARE_16_X11_SOURCES)
40libevas_engine_software_16_x11_la_LIBADD = $(SOFTWARE_16_X11_LIBADD)
41
42endif
30endif 43endif
31 44
32EXTRA_DIST = evas_engine.h 45EXTRA_DIST = evas_engine.h
diff --git a/legacy/evas/src/modules/engines/software_16_x11/evas_engine.c b/legacy/evas/src/modules/engines/software_16_x11/evas_engine.c
index 720e948b65..d4906e97ad 100644
--- a/legacy/evas/src/modules/engines/software_16_x11/evas_engine.c
+++ b/legacy/evas/src/modules/engines/software_16_x11/evas_engine.c
@@ -544,7 +544,7 @@ eng_output_idle_flush(void *data)
544 544
545 545
546/* module advertising code */ 546/* module advertising code */
547EAPI int 547static int
548module_open(Evas_Module *em) 548module_open(Evas_Module *em)
549{ 549{
550 if (!em) return 0; 550 if (!em) return 0;
@@ -572,15 +572,25 @@ module_open(Evas_Module *em)
572 return 1; 572 return 1;
573} 573}
574 574
575EAPI void 575static void
576module_close(void) 576module_close(Evas_Module *em)
577{ 577{
578} 578}
579 579
580EAPI Evas_Module_Api evas_modapi = 580static Evas_Module_Api evas_modapi =
581{ 581{
582 EVAS_MODULE_API_VERSION, 582 EVAS_MODULE_API_VERSION,
583 EVAS_MODULE_TYPE_ENGINE, 583 "software_16_x11",
584 "software_16_x11", 584 "none",
585 "none" 585 {
586 module_open,
587 module_close
588 }
586}; 589};
590
591EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_16_x11);
592
593#ifndef EVAS_STATIC_BUILD_SOFTWARE_16_X11
594EVAS_EINA_MODULE_DEFINE(engine, software_16_x11);
595#endif
596
diff --git a/legacy/evas/src/modules/engines/software_ddraw/Makefile.am b/legacy/evas/src/modules/engines/software_ddraw/Makefile.am
index 72cbe7ae82..751f50aa55 100644
--- a/legacy/evas/src/modules/engines/software_ddraw/Makefile.am
+++ b/legacy/evas/src/modules/engines/software_ddraw/Makefile.am
@@ -12,22 +12,35 @@ AM_CPPFLAGS = \
12 12
13if BUILD_ENGINE_SOFTWARE_DDRAW 13if BUILD_ENGINE_SOFTWARE_DDRAW
14 14
15pkgdir = $(libdir)/evas/modules/engines/software_ddraw/$(MODULE_ARCH) 15SOFTWARE_DDRAW_SOURCES = \
16
17pkg_LTLIBRARIES = module.la
18module_la_SOURCES = \
19evas_engine.c \ 16evas_engine.c \
20evas_outbuf.c \ 17evas_outbuf.c \
21evas_ddraw_buffer.c \ 18evas_ddraw_buffer.c \
22evas_ddraw_main.cpp 19evas_ddraw_main.cpp
23 20
21SOFTWARE_DDRAW_LIBADD = @evas_engine_software_ddraw_libs@
22
23pkgdir = $(libdir)/evas/modules/engines/software_ddraw/$(MODULE_ARCH)
24
25include_HEADERS = Evas_Engine_Software_DDraw.h
26
27if !EVAS_STATIC_BUILD_SOFTWARE_DDRAW
28
29pkg_LTLIBRARIES = module.la
30module_la_SOURCES = $(SOFTWARE_DDRAW_SOURCES)
24module_la_CXXFLAGS = -fno-rtti -fno-exceptions 31module_la_CXXFLAGS = -fno-rtti -fno-exceptions
25module_la_LIBADD = @EINA_LIBS@ @evas_engine_software_ddraw_libs@ $(top_builddir)/src/lib/libevas.la 32module_la_LIBADD = @EINA_LIBS@ $(SOFTWARE_DDRAW_LIBADD) $(top_builddir)/src/lib/libevas.la
26module_la_LDFLAGS = -no-undefined -module -avoid-version 33module_la_LDFLAGS = -no-undefined -module -avoid-version
27module_la_LIBTOOLFLAGS = --tag=disable-static 34module_la_LIBTOOLFLAGS = --tag=disable-static
28 35
29include_HEADERS = Evas_Engine_Software_DDraw.h 36else
30 37
38noinst_LTLIBRARIES = libevas_engine_software_ddraw.la
39
40libevas_engine_software_ddraw_la_SOURCES = $(SOFTWARE_DDRAW_SOURCES)
41libevas_engine_software_ddraw_la_LIBADD = $(SOFTWARE_DDRAW_LIBADD)
42
43endif
31endif 44endif
32 45
33EXTRA_DIST = evas_engine.h 46EXTRA_DIST = evas_engine.h
diff --git a/legacy/evas/src/modules/engines/software_ddraw/evas_engine.c b/legacy/evas/src/modules/engines/software_ddraw/evas_engine.c
index 61abfb1ee7..0cf7a2f4b8 100644
--- a/legacy/evas/src/modules/engines/software_ddraw/evas_engine.c
+++ b/legacy/evas/src/modules/engines/software_ddraw/evas_engine.c
@@ -311,7 +311,7 @@ eng_output_idle_flush(void *data)
311 311
312 312
313/* module advertising code */ 313/* module advertising code */
314EAPI int 314static int
315module_open(Evas_Module *em) 315module_open(Evas_Module *em)
316{ 316{
317 if (!em) return 0; 317 if (!em) return 0;
@@ -339,15 +339,24 @@ module_open(Evas_Module *em)
339 return 1; 339 return 1;
340} 340}
341 341
342EAPI void 342static void
343module_close(void) 343module_close(Evas_Module *em)
344{ 344{
345} 345}
346 346
347EAPI Evas_Module_Api evas_modapi = 347static Evas_Module_Api evas_modapi =
348{ 348{
349 EVAS_MODULE_API_VERSION, 349 EVAS_MODULE_API_VERSION,
350 EVAS_MODULE_TYPE_ENGINE,
351 "software_ddraw", 350 "software_ddraw",
352 "none" 351 "none",
352 {
353 module_open,
354 module_close
355 }
353}; 356};
357
358EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_ddraw);
359
360#ifndef EVAS_STATIC_BUILD_SOFTWARE_DDRAW
361EVAS_EINA_MODULE_DEFINE(engine, software_ddraw);
362#endif
diff --git a/legacy/evas/src/modules/engines/software_gdi/Makefile.am b/legacy/evas/src/modules/engines/software_gdi/Makefile.am
index daf5f85ff6..943d4184b1 100644
--- a/legacy/evas/src/modules/engines/software_gdi/Makefile.am
+++ b/legacy/evas/src/modules/engines/software_gdi/Makefile.am
@@ -12,21 +12,34 @@ AM_CPPFLAGS = \
12 12
13if BUILD_ENGINE_SOFTWARE_GDI 13if BUILD_ENGINE_SOFTWARE_GDI
14 14
15pkgdir = $(libdir)/evas/modules/engines/software_gdi/$(MODULE_ARCH) 15SOFTWARE_GDI_SOURCES = \
16
17pkg_LTLIBRARIES = module.la
18module_la_SOURCES = \
19evas_engine.c \ 16evas_engine.c \
20evas_outbuf.c \ 17evas_outbuf.c \
21evas_gdi_buffer.c \ 18evas_gdi_buffer.c \
22evas_gdi_main.c 19evas_gdi_main.c
23 20
24module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ @evas_engine_software_gdi_libs@ 21SOFTWARE_GDI_LIBADD = @evas_engine_software_gdi_libs@
22
23pkgdir = $(libdir)/evas/modules/engines/software_gdi/$(MODULE_ARCH)
24
25include_HEADERS = Evas_Engine_Software_Gdi.h
26
27if !EVAS_STATIC_BUILD_SOFTWARE_GDI
28
29pkg_LTLIBRARIES = module.la
30module_la_SOURCES = $(SOFTWARE_GDI_SOURCES)
31module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ $(SOFTWARE_GDI_LIBADD)
25module_la_LDFLAGS = -no-undefined -module -avoid-version 32module_la_LDFLAGS = -no-undefined -module -avoid-version
26module_la_LIBTOOLFLAGS = --tag=disable-static 33module_la_LIBTOOLFLAGS = --tag=disable-static
27 34
28include_HEADERS = Evas_Engine_Software_Gdi.h 35else
29 36
37noinst_LTLIBRARIES = libevas_engine_software_gdi.la
38
39libevas_engine_software_gdi_la_SOURCES = $(SOFTWARE_GDI_SOURCES)
40libevas_engine_software_gdi_la_LIBADD = $(SOFTWARE_GDI_LIBADD)
41
42endif
30endif 43endif
31 44
32EXTRA_DIST = evas_engine.h 45EXTRA_DIST = evas_engine.h
diff --git a/legacy/evas/src/modules/engines/software_gdi/evas_engine.c b/legacy/evas/src/modules/engines/software_gdi/evas_engine.c
index 5b73cadc26..4c9eb2d9a1 100644
--- a/legacy/evas/src/modules/engines/software_gdi/evas_engine.c
+++ b/legacy/evas/src/modules/engines/software_gdi/evas_engine.c
@@ -321,7 +321,7 @@ eng_output_idle_flush(void *data)
321 321
322 322
323/* module advertising code */ 323/* module advertising code */
324EAPI int 324static int
325module_open(Evas_Module *em) 325module_open(Evas_Module *em)
326{ 326{
327 if (!em) return 0; 327 if (!em) return 0;
@@ -349,15 +349,24 @@ module_open(Evas_Module *em)
349 return 1; 349 return 1;
350} 350}
351 351
352EAPI void 352static void
353module_close(void) 353module_close(Evas_Module *em)
354{ 354{
355} 355}
356 356
357EAPI Evas_Module_Api evas_modapi = 357static Evas_Module_Api evas_modapi =
358{ 358{
359 EVAS_MODULE_API_VERSION, 359 EVAS_MODULE_API_VERSION,
360 EVAS_MODULE_TYPE_ENGINE,
361 "software_gdi", 360 "software_gdi",
362 "none" 361 "none",
362 {
363 module_open,
364 module_close
365 }
363}; 366};
367
368EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_gdi);
369
370#ifndef EVAS_STATIC_BUILD_SOFTWARE_GDI
371EVAS_EINA_MODULE_DEFINE(engine, software_gdi);
372#endif
diff --git a/legacy/evas/src/modules/engines/software_generic/Makefile.am b/legacy/evas/src/modules/engines/software_generic/Makefile.am
index 3c4a5e547e..de7f9826d5 100644
--- a/legacy/evas/src/modules/engines/software_generic/Makefile.am
+++ b/legacy/evas/src/modules/engines/software_generic/Makefile.am
@@ -11,12 +11,24 @@ AM_CPPFLAGS = \
11 11
12AM_CFLAGS = @WIN32_CFLAGS@ 12AM_CFLAGS = @WIN32_CFLAGS@
13 13
14SOFTWARE_GENERIC_SOURCES = evas_engine.c
15
14pkgdir = $(libdir)/evas/modules/engines/software_generic/$(MODULE_ARCH) 16pkgdir = $(libdir)/evas/modules/engines/software_generic/$(MODULE_ARCH)
15 17
18if !EVAS_STATIC_BUILD_SOFTWARE_GENERIC
19
16pkg_LTLIBRARIES = module.la 20pkg_LTLIBRARIES = module.la
17 21
18module_la_SOURCES = evas_engine.c 22module_la_SOURCES = $(SOFTWARE_GENERIC_SOURCES)
19 23
20module_la_LIBADD = @EINA_LIBS@ $(top_builddir)/src/lib/libevas.la 24module_la_LIBADD = @EINA_LIBS@ $(top_builddir)/src/lib/libevas.la
21module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version 25module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
22module_la_LIBTOOLFLAGS = --tag=disable-static 26module_la_LIBTOOLFLAGS = --tag=disable-static
27
28else
29
30noinst_LTLIBRARIES = libevas_engine_software_generic.la
31
32libevas_engine_software_generic_la_SOURCES = $(SOFTWARE_GENERIC_SOURCES)
33
34endif
diff --git a/legacy/evas/src/modules/engines/software_generic/evas_engine.c b/legacy/evas/src/modules/engines/software_generic/evas_engine.c
index 566dddaba0..5dc7a0302b 100644
--- a/legacy/evas/src/modules/engines/software_generic/evas_engine.c
+++ b/legacy/evas/src/modules/engines/software_generic/evas_engine.c
@@ -1121,7 +1121,7 @@ static Evas_Func func =
1121 ***** 1121 *****
1122 */ 1122 */
1123 1123
1124EAPI int 1124static int
1125module_open(Evas_Module *em) 1125module_open(Evas_Module *em)
1126{ 1126{
1127 if (!em) return 0; 1127 if (!em) return 0;
@@ -1130,15 +1130,24 @@ module_open(Evas_Module *em)
1130 return 1; 1130 return 1;
1131} 1131}
1132 1132
1133EAPI void 1133static void
1134module_close(void) 1134module_close(Evas_Module *em)
1135{ 1135{
1136} 1136}
1137 1137
1138EAPI Evas_Module_Api evas_modapi = 1138static Evas_Module_Api evas_modapi =
1139{ 1139{
1140 EVAS_MODULE_API_VERSION, 1140 EVAS_MODULE_API_VERSION,
1141 EVAS_MODULE_TYPE_ENGINE, 1141 "software_generic",
1142 "software_generic", 1142 "none",
1143 "none" 1143 {
1144 module_open,
1145 module_close
1146 }
1144}; 1147};
1148
1149EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_generic);
1150
1151#ifndef EVAS_STATIC_BUILD_SOFTWARE_GENERIC
1152EVAS_EINA_MODULE_DEFINE(engine, software_generic);
1153#endif
diff --git a/legacy/evas/src/modules/engines/software_qtopia/Makefile.am b/legacy/evas/src/modules/engines/software_qtopia/Makefile.am
index 8998b12fac..a8ac9000d4 100644
--- a/legacy/evas/src/modules/engines/software_qtopia/Makefile.am
+++ b/legacy/evas/src/modules/engines/software_qtopia/Makefile.am
@@ -14,20 +14,33 @@ AM_CXXFLAGS = $(CFLAGS) -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -DNO_DEBUG
14 14
15if BUILD_ENGINE_SOFTWARE_QTOPIA 15if BUILD_ENGINE_SOFTWARE_QTOPIA
16 16
17pkgdir = $(libdir)/evas/modules/engines/software_qtopia/$(MODULE_ARCH) 17SOFTWARE_QTOPIA_SOURCES = \
18
19pkg_LTLIBRARIES = module.la
20module_la_SOURCES = \
21evas_engine.c \ 18evas_engine.c \
22evas_outbuf.c \ 19evas_outbuf.c \
23evas_qt_main.cpp 20evas_qt_main.cpp
24 21
25module_la_LIBADD = @EINA_LIBS@ @evas_engine_software_qtopia_libs@ $(top_builddir)/src/lib/libevas.la 22SOFTWARE_QTOPIA_LIBADD = @evas_engine_software_qtopia_libs@
23
24pkgdir = $(libdir)/evas/modules/engines/software_qtopia/$(MODULE_ARCH)
25
26include_HEADERS = Evas_Engine_Software_Qtopia.h
27
28if !EVAS_STATIC_BUILD_SOFTWARE_QTOPIA
29
30pkg_LTLIBRARIES = module.la
31module_la_SOURCES = $(SOFTWARE_QTOPIA_SOURCES)
32module_la_LIBADD = @EINA_LIBS@ $(SOFTWARE_QTOPIA_LIBADD) $(top_builddir)/src/lib/libevas.la
26module_la_LDFLAGS = -module -avoid-version 33module_la_LDFLAGS = -module -avoid-version
27module_la_LIBTOOLFLAGS = --tag=disable-static 34module_la_LIBTOOLFLAGS = --tag=disable-static
28 35
29include_HEADERS = Evas_Engine_Software_Qtopia.h 36else
30 37
38noinst_LTLIBRARIES = libevas_engine_software_qtopia.la
39
40libevas_engine_software_qtopia_la_SOURCES = $(SOFTWARE_QTOPIA_SOURCES)
41libevas_engine_software_qtopia_la_LIBADD = $(SOFTWARE_QTOPIA_LIBADD)
42
43endif
31endif 44endif
32 45
33EXTRA_DIST = evas_engine.h 46EXTRA_DIST = evas_engine.h
diff --git a/legacy/evas/src/modules/engines/software_qtopia/evas_engine.c b/legacy/evas/src/modules/engines/software_qtopia/evas_engine.c
index be3259081f..83eadfbeba 100644
--- a/legacy/evas/src/modules/engines/software_qtopia/evas_engine.c
+++ b/legacy/evas/src/modules/engines/software_qtopia/evas_engine.c
@@ -263,7 +263,7 @@ eng_output_idle_flush(void *data)
263} 263}
264 264
265/* module advertising code */ 265/* module advertising code */
266EAPI int 266static int
267module_open(Evas_Module *em) 267module_open(Evas_Module *em)
268{ 268{
269 if (!em) return 0; 269 if (!em) return 0;
@@ -291,15 +291,24 @@ module_open(Evas_Module *em)
291 return 1; 291 return 1;
292} 292}
293 293
294EAPI void 294static void
295module_close(void) 295module_close(Evas_Module *em)
296{ 296{
297} 297}
298 298
299EAPI Evas_Module_Api evas_modapi = 299static Evas_Module_Api evas_modapi =
300{ 300{
301 EVAS_MODULE_API_VERSION, 301 EVAS_MODULE_API_VERSION,
302 EVAS_MODULE_TYPE_ENGINE, 302 "software_qtopia",
303 "software_qtopia", 303 "none",
304 "none" 304 {
305 module_open,
306 module_close
307 }
305}; 308};
309
310EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_qtopia);
311
312#ifndef EVAS_STATIC_BUILD_SOFTWARE_QTOPIA
313EVAS_EINA_MODULE_DEFINE(engine, software_qtopia);
314#endif
diff --git a/legacy/evas/src/modules/engines/software_sdl/Makefile.am b/legacy/evas/src/modules/engines/software_sdl/Makefile.am
index 1962683a44..19814727b0 100644
--- a/legacy/evas/src/modules/engines/software_sdl/Makefile.am
+++ b/legacy/evas/src/modules/engines/software_sdl/Makefile.am
@@ -14,18 +14,30 @@ AM_CFLAGS = @WIN32_CFLAGS@
14 14
15if BUILD_ENGINE_SOFTWARE_SDL 15if BUILD_ENGINE_SOFTWARE_SDL
16 16
17SOFTWARE_SDL_SOURCES = evas_engine.c
18SOFTWARE_SDL_LIBADD = @evas_engine_software_sdl_libs@
19
17pkgdir = $(libdir)/evas/modules/engines/software_sdl/$(MODULE_ARCH) 20pkgdir = $(libdir)/evas/modules/engines/software_sdl/$(MODULE_ARCH)
18 21
19pkg_LTLIBRARIES = module.la 22include_HEADERS = Evas_Engine_SDL.h
20 23
21module_la_SOURCES = evas_engine.c 24if !EVAS_STATIC_BUILD_SOFTWARE_SDL
25
26pkg_LTLIBRARIES = module.la
22 27
23module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ @evas_engine_software_sdl_libs@ 28module_la_SOURCES = $(SOFTWARE_SDL_SOURCES)
29module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ $(SOFTWARE_SDL_LIBADD)
24module_la_LDFLAGS = -no-undefined -module -avoid-version 30module_la_LDFLAGS = -no-undefined -module -avoid-version
25module_la_LIBTOOLFLAGS = --tag=disable-static 31module_la_LIBTOOLFLAGS = --tag=disable-static
26 32
27include_HEADERS = Evas_Engine_SDL.h 33else
34
35noinst_LTLIBRARIES = libevas_engine_software_sdl.la
28 36
37libevas_engine_software_sdl_la_SOURCES = $(SOFTWARE_SDL_SOURCES)
38libevas_engine_software_sdl_la_LIBADD = $(SOFTWARE_SDL_LIBADD)
39
40endif
29endif 41endif
30 42
31EXTRA_DIST = evas_engine.h 43EXTRA_DIST = evas_engine.h
diff --git a/legacy/evas/src/modules/engines/software_sdl/evas_engine.c b/legacy/evas/src/modules/engines/software_sdl/evas_engine.c
index 13c7f5dcea..5d542ba40c 100644
--- a/legacy/evas/src/modules/engines/software_sdl/evas_engine.c
+++ b/legacy/evas/src/modules/engines/software_sdl/evas_engine.c
@@ -817,7 +817,7 @@ evas_engine_sdl_gradient_draw(void *data __UNUSED__, void *context, void *surfac
817 SDL_UnlockSurface(eim->surface); 817 SDL_UnlockSurface(eim->surface);
818} 818}
819 819
820EAPI int module_open(Evas_Module *em) 820static int module_open(Evas_Module *em)
821{ 821{
822 if (!em) return 0; 822 if (!em) return 0;
823 /* get whatever engine module we inherit from */ 823 /* get whatever engine module we inherit from */
@@ -876,19 +876,28 @@ EAPI int module_open(Evas_Module *em)
876 return 1; 876 return 1;
877} 877}
878 878
879EAPI void module_close(void) 879static void module_close(Evas_Module *em)
880{ 880{
881 881
882} 882}
883 883
884EAPI Evas_Module_Api evas_modapi = 884static Evas_Module_Api evas_modapi =
885{ 885{
886 EVAS_MODULE_API_VERSION, 886 EVAS_MODULE_API_VERSION,
887 EVAS_MODULE_TYPE_ENGINE, 887 "software_sdl",
888 "software_sdl", 888 "none",
889 "none" 889 {
890 module_open,
891 module_close
892 }
890}; 893};
891 894
895EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_sdl);
896
897#ifndef EVAS_STATIC_BUILD_SOFTWARE_SDL
898EVAS_EINA_MODULE_DEFINE(engine, software_sdl);
899#endif
900
892/* Private routines. */ 901/* Private routines. */
893 902
894static void* 903static void*
diff --git a/legacy/evas/src/modules/engines/software_x11/Makefile.am b/legacy/evas/src/modules/engines/software_x11/Makefile.am
index 76a93c4d22..3730b4286b 100644
--- a/legacy/evas/src/modules/engines/software_x11/Makefile.am
+++ b/legacy/evas/src/modules/engines/software_x11/Makefile.am
@@ -13,20 +13,18 @@ AM_CPPFLAGS = \
13 13
14if BUILD_ENGINE_SOFTWARE_X11 14if BUILD_ENGINE_SOFTWARE_X11
15 15
16pkgdir = $(libdir)/evas/modules/engines/software_x11/$(MODULE_ARCH) 16SOFTWARE_X11_SOURCES = \
17
18pkg_LTLIBRARIES = module.la
19
20module_la_SOURCES = \
21evas_engine.c \ 17evas_engine.c \
22evas_xlib_outbuf.c \ 18evas_xlib_outbuf.c \
23evas_xlib_buffer.c \ 19evas_xlib_buffer.c \
24evas_xlib_color.c \ 20evas_xlib_color.c \
25evas_xlib_main.c 21evas_xlib_main.c
26 22
23SOFTWARE_X11_LIBADD = @evas_engine_software_x11_libs@ @evas_engine_software_xcb_libs@
24
27if BUILD_ENGINE_SOFTWARE_XCB 25if BUILD_ENGINE_SOFTWARE_XCB
28 26
29module_la_SOURCES += \ 27SOFTWARE_X11_SOURCES +=\
30evas_xcb_outbuf.c \ 28evas_xcb_outbuf.c \
31evas_xcb_buffer.c \ 29evas_xcb_buffer.c \
32evas_xcb_color.c \ 30evas_xcb_color.c \
@@ -34,12 +32,27 @@ evas_xcb_main.c
34 32
35endif 33endif
36 34
37module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ @evas_engine_software_x11_libs@ @evas_engine_software_xcb_libs@ 35pkgdir = $(libdir)/evas/modules/engines/software_x11/$(MODULE_ARCH)
36
37include_HEADERS = Evas_Engine_Software_X11.h
38
39if !EVAS_STATIC_BUILD_SOFTWARE_X11
40
41pkg_LTLIBRARIES = module.la
42
43module_la_SOURCES = $(SOFTWARE_X11_SOURCES)
44module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ $(SOFTWARE_X11_LIBADD)
38module_la_LDFLAGS = -no-undefined -module -avoid-version 45module_la_LDFLAGS = -no-undefined -module -avoid-version
39module_la_LIBTOOLFLAGS = --tag=disable-static 46module_la_LIBTOOLFLAGS = --tag=disable-static
40 47
41include_HEADERS = Evas_Engine_Software_X11.h 48else
49
50noinst_LTLIBRARIES = libevas_engine_software_x11.la
42 51
52libevas_engine_software_x11_la_SOURCES = $(SOFTWARE_X11_SOURCES)
53libevas_engine_software_x11_la_LIBADD = $(SOFTWARE_X11_LIBADD)
54
55endif
43endif 56endif
44 57
45EXTRA_DIST = \ 58EXTRA_DIST = \
diff --git a/legacy/evas/src/modules/engines/software_x11/evas_engine.c b/legacy/evas/src/modules/engines/software_x11/evas_engine.c
index f480b68ffc..03d5d66934 100644
--- a/legacy/evas/src/modules/engines/software_x11/evas_engine.c
+++ b/legacy/evas/src/modules/engines/software_x11/evas_engine.c
@@ -613,7 +613,7 @@ eng_output_idle_flush(void *data)
613 613
614 614
615/* module advertising code */ 615/* module advertising code */
616EAPI int 616static int
617module_open(Evas_Module *em) 617module_open(Evas_Module *em)
618{ 618{
619 if (!em) return 0; 619 if (!em) return 0;
@@ -641,15 +641,25 @@ module_open(Evas_Module *em)
641 return 1; 641 return 1;
642} 642}
643 643
644EAPI void 644static void
645module_close(void) 645module_close(Evas_Module *em)
646{ 646{
647} 647}
648 648
649EAPI Evas_Module_Api evas_modapi = 649static Evas_Module_Api evas_modapi =
650{ 650{
651 EVAS_MODULE_API_VERSION, 651 EVAS_MODULE_API_VERSION,
652 EVAS_MODULE_TYPE_ENGINE, 652 "software_x11",
653 "software_x11", 653 "none",
654 "none" 654 {
655 module_open,
656 module_close
657 }
655}; 658};
659
660EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_x11);
661
662#ifndef EVAS_STATIC_BUILD_SOFTWARE_X11
663EVAS_EINA_MODULE_DEFINE(engine, software_x11);
664#endif
665
diff --git a/legacy/evas/src/modules/engines/xrender_x11/Makefile.am b/legacy/evas/src/modules/engines/xrender_x11/Makefile.am
index 907401858a..83d1a7739e 100644
--- a/legacy/evas/src/modules/engines/xrender_x11/Makefile.am
+++ b/legacy/evas/src/modules/engines/xrender_x11/Makefile.am
@@ -13,11 +13,7 @@ AM_CPPFLAGS = \
13 13
14if BUILD_ENGINE_XRENDER_X11 14if BUILD_ENGINE_XRENDER_X11
15 15
16pkgdir = $(libdir)/evas/modules/engines/xrender_x11/$(MODULE_ARCH) 16XRENDER_X11_SOURCES = \
17
18pkg_LTLIBRARIES = module.la
19
20module_la_SOURCES = \
21evas_engine_xlib_font.c \ 17evas_engine_xlib_font.c \
22evas_engine_xlib_gradient.c \ 18evas_engine_xlib_gradient.c \
23evas_engine_xlib_image.c \ 19evas_engine_xlib_image.c \
@@ -26,20 +22,39 @@ evas_engine_xlib_ximage.c \
26evas_engine.c 22evas_engine.c
27 23
28if BUILD_ENGINE_XRENDER_XCB 24if BUILD_ENGINE_XRENDER_XCB
29module_la_SOURCES += \ 25
26XRENDER_X11_SOURCES += \
30evas_engine_xcb_font.c \ 27evas_engine_xcb_font.c \
31evas_engine_xcb_gradient.c \ 28evas_engine_xcb_gradient.c \
32evas_engine_xcb_image.c \ 29evas_engine_xcb_image.c \
33evas_engine_xcb_render.c \ 30evas_engine_xcb_render.c \
34evas_engine_xcb_ximage.c 31evas_engine_xcb_ximage.c
32
35endif 33endif
36 34
37module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ @evas_engine_xrender_xcb_libs@ @evas_engine_xrender_x11_libs@ 35XRENDER_X11_LIBADD = @evas_engine_xrender_xcb_libs@ @evas_engine_xrender_x11_libs@
36
37pkgdir = $(libdir)/evas/modules/engines/xrender_x11/$(MODULE_ARCH)
38
39include_HEADERS = Evas_Engine_XRender_X11.h
40
41if !EVAS_STATIC_BUILD_XRENDER_X11
42
43pkg_LTLIBRARIES = module.la
44
45module_la_SOURCES = $(XRENDER_X11_SOURCES)
46module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ $(XRENDER_X11_LIBADD)
38module_la_LDFLAGS = -no-undefined -module -avoid-version 47module_la_LDFLAGS = -no-undefined -module -avoid-version
39module_la_LIBTOOLFLAGS = --tag=disable-static 48module_la_LIBTOOLFLAGS = --tag=disable-static
40 49
41include_HEADERS = Evas_Engine_XRender_X11.h 50else
51
52noinst_LTLIBRARIES = libevas_engine_xrender_x11.la
42 53
54libevas_engine_xrender_x11_la_SOURCES = $(XRENDER_X11_SOURCES)
55libevas_engine_xrender_x11_la_LIBADD = $(XRENDER_X11_LIBADD)
56
57endif
43endif 58endif
44 59
45EXTRA_DIST = evas_engine.h 60EXTRA_DIST = evas_engine.h
diff --git a/legacy/evas/src/modules/engines/xrender_x11/evas_engine.c b/legacy/evas/src/modules/engines/xrender_x11/evas_engine.c
index 167368581a..2d17ff3ac0 100644
--- a/legacy/evas/src/modules/engines/xrender_x11/evas_engine.c
+++ b/legacy/evas/src/modules/engines/xrender_x11/evas_engine.c
@@ -1398,12 +1398,13 @@ eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y
1398} 1398}
1399 1399
1400/* module advertising code */ 1400/* module advertising code */
1401EAPI int 1401static int
1402module_open(Evas_Module *em) 1402module_open(Evas_Module *em)
1403{ 1403{
1404 if (!em) return 0;