summaryrefslogtreecommitdiff
path: root/src/Makefile_Evas_Cxx.am
diff options
context:
space:
mode:
authorSavio Sena <savio@expertisesolutions.com.br>2014-05-03 00:55:51 +0200
committerCedric Bail <cedric.bail@free.fr>2014-05-03 00:56:32 +0200
commit46b6e8a563bd429690e7bffba4e98d06aa40798d (patch)
treeb7a2aebfc32bcc6d7a2600072a00d69a9f68d9a1 /src/Makefile_Evas_Cxx.am
parent64c6c63725d96f03baf34b660ca71e13b29078c1 (diff)
eolian_cxx: initial version of the EFL C++ Bindings Generator.
Summary: This patch adds 'eolian_cxx' -- a C++ bindings generator -- to the EFL tree. Eolian Cxx uses Eolian API to read .eo files and generate .eo.hh. It relies/depends on Eo Cxx and Eina Cxx (both non-generated bindings). src/bin/eolian_cxx: The eolian_cxx program. src/lib/eolian_cxx: A header-only library that implements the C++ code generation that binds the .eo classes. =Examples= src/examples/eolian_cxx/eolian_cxx_simple_01.cc: The simplest example, it just uses some "dummy" generated C++ classes. src/examples/eolian_cxx/eolian_cxx_inherit_01.cc: Illustrates how pure C++ classes inherit from .eo generated classes. src/examples/evas/evas_cxx_rectangle.cc: More realistic example using the generated bindings Evas Cxx. Still a bit shallow because we don't have full fledged .eo descriptions yet, but will be improved. =Important= The generated code is not supported and not a stable API/ABI. It is here to gather people interest and get review before we set things in stone for release 1.11. @feature Reviewers: cedric, smohanty, raster, stefan_schmidt CC: felipealmeida, JackDanielZ, cedric, stefan Differential Revision: https://phab.enlightenment.org/D805 Signed-off-by: Cedric Bail <cedric.bail@free.fr>
Diffstat (limited to 'src/Makefile_Evas_Cxx.am')
-rw-r--r--src/Makefile_Evas_Cxx.am76
1 files changed, 76 insertions, 0 deletions
diff --git a/src/Makefile_Evas_Cxx.am b/src/Makefile_Evas_Cxx.am
new file mode 100644
index 0000000..5938223
--- /dev/null
+++ b/src/Makefile_Evas_Cxx.am
@@ -0,0 +1,76 @@
1
2if HAVE_CXX11
3
4### Generated headers
5
6generated_evas_canvas_cxx_bindings = \
7lib/evas/canvas/evas_line.eo.hh \
8lib/evas/canvas/evas_polygon.eo.hh \
9lib/evas/canvas/evas_rectangle.eo.hh \
10lib/evas/canvas/evas_text.eo.hh \
11lib/evas/canvas/evas_textblock.eo.hh \
12lib/evas/canvas/evas_textgrid.eo.hh \
13lib/evas/canvas/evas_signal_interface.eo.hh \
14lib/evas/canvas/evas_smart.eo.hh \
15lib/evas/canvas/evas_smart_clipped.eo.hh \
16lib/evas/canvas/evas_table.eo.hh \
17lib/evas/canvas/evas_common_interface.eo.hh \
18lib/evas/canvas/evas_object.eo.hh \
19lib/evas/canvas/evas.eo.hh \
20lib/evas/canvas/evas_grid.eo.hh \
21lib/evas/canvas/evas_image.eo.hh \
22lib/evas/canvas/evas_out.eo.hh \
23lib/evas/canvas/evas_draggable_interface.eo.hh \
24lib/evas/canvas/evas_clickable_interface.eo.hh \
25lib/evas/canvas/evas_scrollable_interface.eo.hh \
26lib/evas/canvas/evas_selectable_interface.eo.hh \
27lib/evas/canvas/evas_zoomable_interface.eo.hh \
28lib/evas/canvas/evas_box.eo.hh
29
30BUILT_SOURCES += lib/evas/Evas.hh $(generated_evas_canvas_cxx_bindings)
31
32installed_evascanvasmainheadersdir = $(includedir)/evas-cxx-@VMAJ@/
33dist_installed_evascanvasmainheaders_DATA = lib/evas/Evas.hh
34
35installed_evascanvasmainheadersdir = $(includedir)/evas-cxx-@VMAJ@/canvas
36dist_installed_evascanvasmainheaders_DATA = $(generated_evas_canvas_cxx_bindings)
37
38lib/evas/Evas.hh:
39 @echo -e "#ifndef EFL_CXX_EVAS_HH\n#define EFL_CXX_EVAS_HH\n" > $(top_builddir)/src/lib/evas/Evas.hh
40 @echo -e "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/evas/Evas.hh
41 @for i in $(generated_evas_canvas_cxx_bindings); do echo "#include <canvas/$$(basename $$i)>" >> $(top_builddir)/src/lib/evas/Evas.hh; done
42 @echo -e "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/evas/Evas.hh
43
44### Unit tests
45
46if EFL_ENABLE_TESTS
47
48check_PROGRAMS += tests/evas_cxx/cxx_compile_test
49TESTS += tests/evas_cxx/cxx_compile_test
50
51tests_evas_cxx_cxx_compile_test_SOURCES = tests/evas_cxx/cxx_compile_test.cc
52tests_evas_cxx_cxx_compile_test_CPPFLAGS = -I$(top_builddir)/src/lib/efl -I$(top_builddir)/src/lib/efl \
53-I$(top_srcdir)/src/lib/edje \
54-I$(top_builddir)/src/lib/edje \
55-I$(top_srcdir)/src/lib/evas \
56-I$(top_builddir)/src/lib/evas \
57-I$(top_srcdir)/src/lib/evas/canvas \
58-I$(top_builddir)/src/lib/evas/canvas \
59-I$(top_srcdir)/src/lib/ecore \
60-I$(top_builddir)/src/lib/ecore \
61-I$(top_srcdir)/src/lib/eo \
62-I$(top_builddir)/src/lib/eo \
63-I$(top_srcdir)/src/bindings/eo_cxx \
64-I$(top_builddir)/src/bindings/eo_cxx \
65-I$(top_srcdir)/src/bindings/ecore_cxx \
66-I$(top_builddir)/src/bindings/ecore_cxx \
67-I$(top_srcdir)/src/bindings/eina_cxx \
68-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/evas_cxx\" \
69-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/evas_cxx\" \
70@CHECK_CFLAGS@ @ECORE_CFLAGS@ @EINA_CFLAGS@
71tests_evas_cxx_cxx_compile_test_LDADD = @CHECK_LIBS@ @USE_ECORE_LIBS@
72tests_evas_cxx_cxx_compile_test_DEPENDENCIES = @USE_ECORE_INTERNAL_LIBS@
73
74endif
75
76endif