aboutsummaryrefslogtreecommitdiffstats
path: root/src/Makefile_Eolian_Js.am
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2014-09-01 15:08:49 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-12-23 23:59:40 -0200
commita3db1dddd3ba67c81118f7f2c0bc753dc8aac551 (patch)
tree233ee1be7bfa299bff560207135d20940c4e411f /src/Makefile_Eolian_Js.am
parent ecore_x: fix memory leak (diff)
downloadefl-a3db1dddd3ba67c81118f7f2c0bc753dc8aac551.tar.gz
efl-js: JavaScript Eolian binding
To configure efl sources with bindings to use in nodejs add ––with-js=nodejs in configure flags to generate node files $ configure --with-js=nodejs and compile normally with: $ make $ make install To use, you have to require efl: efl = require('efl') The bindings is divided in two parts: generated and manually written. The generation uses the Eolian library for parsing Eo files and generate C++ code that is compiled against V8 interpreter library to create a efl.node file that can be required in a node.js instance. @feature
Diffstat (limited to 'src/Makefile_Eolian_Js.am')
-rw-r--r--src/Makefile_Eolian_Js.am123
1 files changed, 123 insertions, 0 deletions
diff --git a/src/Makefile_Eolian_Js.am b/src/Makefile_Eolian_Js.am
new file mode 100644
index 0000000000..32cf893bf6
--- /dev/null
+++ b/src/Makefile_Eolian_Js.am
@@ -0,0 +1,123 @@
+
+if HAVE_JS
+
+### Binary
+bin_PROGRAMS += bin/eolian_js/eolian_js
+
+bin_eolian_js_eolian_js_SOURCES = \
+ bin/eolian_js/main.cc
+
+bin_eolian_js_eolian_js_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
+-I$(top_srcdir)/src/bin/eolian_js \
+-I$(top_srcdir)/src/bindings/js/eina_js \
+-I$(top_srcdir)/src/bindings/js/eo_js \
+@EOLIAN_JS_CFLAGS@ \
+@EINA_CXX_CFLAGS@ \
+@EOLIAN_CXX_CFLAGS@
+
+bin_eolian_js_eolian_js_LDADD = @USE_EO_LIBS@ @USE_EOLIAN_LIBS@
+bin_eolian_js_eolian_js_DEPENDENCIES = @USE_EO_INTERNAL_LIBS@ @USE_EOLIAN_INTERNAL_LIBS@
+
+include Makefile_Eolian_Js_Helper.am
+
+### Unit tests
+
+if EFL_ENABLE_TESTS
+if HAVE_NODEJS
+
+TESTS += tests/eolian_js/eolian_js_suite.js
+
+check_LTLIBRARIES += tests/eolian_js/libeolian_js_suite.la
+
+tests/eolian_js/eolian_js_suite.js: tests/eolian_js/eolian_js_suite_mod.node
+tests/eolian_js/eolian_js_suite_mod.node: tests/eolian_js/libeolian_js_suite.la
+ $(AM_V_CP)$(CP) $(top_builddir)/src/tests/eolian_js/.libs/libeolian_js_suite.so $(top_builddir)/src/tests/eolian_js/eolian_js_suite_mod.node
+
+tests_eolian_js_libeolian_js_suite_la_SOURCES = \
+tests/eolian_js/eolian_js_suite.cc \
+tests/eolian_js/eolian_js_test_eolian_js_binding.cc \
+tests/eolian_js/eolian_js_test_constructor_method_impl.c \
+tests/eolian_js/eolian_js_test_test_object_impl.c
+
+tests_eolian_js_libeolian_js_suite_la_CPPFLAGS = \
+-I$(top_builddir)/src/lib/efl \
+-I$(top_srcdir)/src/bin/eolian_js \
+-I$(top_srcdir)/src/bindings/js/eina_js \
+-I$(top_srcdir)/src/bindings/js/eo_js \
+-I$(top_builddir)/src/tests/eolian_js \
+-DTESTS_WD=\"`pwd`\" \
+-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/eolian_js\" \
+-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)/src/tests/eolian_js\" \
+-DPACKAGE_DATA_DIR=\"$(datadir)/eolian_js\" \
+-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/eolian_js\" \
+@CHECK_CFLAGS@ @EOLIAN_CXX_CFLAGS@ @EINA_JS_CFLAGS@ @EO_JS_CFLAGS@ \
+@EOLIAN_CFLAGS@ @EINA_CFLAGS@ @EO_CFLAGS@ @ECORE_CFLAGS@ @EINA_CXX_CFLAGS@ \
+@EO_JS_CFLAGS@ @EO_CXX_CFLAGS@
+tests_eolian_js_libeolian_js_suite_la_LIBADD = \
+@CHECK_LIBS@ @USE_EO_LIBS@ @USE_EINA_LIBS@ @USE_EOLIAN_LIBS@ @USE_EFL_JS_LIBS@
+tests_eolian_js_libeolian_js_suite_la_DEPENDENCIES = @USE_EINA_INTERNAL_LIBS@ @USE_EO_INTERNAL_LIBS@ @USE_EFL_JS_INTERNAL_LIBS@
+tests_eolian_js_libeolian_js_suite_la_CFLAGS = $(tests_eolian_js_libeolian_js_suite_la_CXXFLAGS)
+tests_eolian_js_libeolian_js_suite_la_LIBTOOLFLAGS = --tag=disable-static
+tests_eolian_js_libeolian_js_suite_la_LDFLAGS = -rpath $(abs_top_builddir)/tests/eolian_js @EFL_LTLIBRARY_FLAGS@
+
+# if compiler_o_lo == yes, lo, otherwise $(OBJEXT)
+
+tests/eolian_js/tests_eolian_js_libeolian_js_suite_la-eolian_js_test_eolian_js_binding.l$(OBJEXT): tests/eolian_js/constructor_method_class.eo.js.cc tests/eolian_js/constructor_method_class.eo.h tests/eolian_js/test_object.eo.js.cc tests/eolian_js/test_object.eo.h
+tests/eolian_js/tests_eolian_js_libeolian_js_suite_la-eolian_js_test_constructor_method_impl.l$(OBJEXT): tests/eolian_js/constructor_method_class.eo.c
+tests/eolian_js/tests_eolian_js_libeolian_js_suite_la-eolian_js_test_test_object_impl.l$(OBJEXT): tests/eolian_js/test_object.eo.c
+
+CLEANFILES += \
+tests/eolian_js/constructor_method_class.eo.js.cc \
+tests/eolian_js/constructor_method_class.eo.c \
+tests/eolian_js/constructor_method_class.eo.h \
+tests/eolian_js/test_object.eo.js.cc \
+tests/eolian_js/test_object.eo.c \
+tests/eolian_js/test_object.eo.h
+else
+check_PROGRAMS += tests/eolian_js/eolian_js_suite
+TESTS += tests/eolian_js/eolian_js_suite
+
+tests_eolian_js_eolian_js_suite_SOURCES = \
+tests/eolian_js/eolian_js_suite.cc \
+tests/eolian_js/eolian_js_test_eolian_js_binding.cc \
+tests/eolian_js/eolian_js_test_constructor_method_impl.c \
+tests/eolian_js/eolian_js_test_test_object_impl.c
+
+tests/eolian_js/tests_eolian_js_eolian_js_suite-eolian_js_test_eolian_js_binding.$(OBJEXT): tests/eolian_js/constructor_method_class.eo.js.cc tests/eolian_js/constructor_method_class.eo.h tests/eolian_js/test_object.eo.js.cc tests/eolian_js/test_object.eo.h
+tests/eolian_js/tests_eolian_js_eolian_js_suite-eolian_js_test_constructor_method_impl.$(OBJEXT): tests/eolian_js/constructor_method_class.eo.c
+tests/eolian_js/tests_eolian_js_eolian_js_suite-eolian_js_test_test_object_impl.$(OBJEXT): tests/eolian_js/test_object.eo.c
+
+CLEANFILES += \
+tests/eolian_js/constructor_method_class.eo.js.cc \
+tests/eolian_js/constructor_method_class.eo.c \
+tests/eolian_js/constructor_method_class.eo.h \
+tests/eolian_js/test_object.eo.js.cc \
+tests/eolian_js/test_object.eo.c \
+tests/eolian_js/test_object.eo.h
+
+tests_eolian_js_eolian_js_suite_CPPFLAGS = \
+-I$(top_builddir)/src/lib/efl \
+-I$(top_srcdir)/src/bin/eolian_js \
+-I$(top_srcdir)/src/bindings/js/eina_js \
+-I$(top_srcdir)/src/bindings/js/eo_js \
+-I$(top_builddir)/src/tests/eolian_js \
+-I$(top_srcdir)/src/tests/efl_js \
+-DTESTS_WD=\"`pwd`\" \
+-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/eolian_js\" \
+-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)/src/tests/eolian_js\" \
+-DPACKAGE_DATA_DIR=\"$(datadir)/eolian_js\" \
+-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/eolian_js\" \
+@CHECK_CFLAGS@ @EOLIAN_CXX_CFLAGS@ @EINA_JS_CFLAGS@ @EO_JS_CFLAGS@ @EFL_JS_CFLAGS@ \
+@EOLIAN_CFLAGS@ @EINA_CFLAGS@ @EO_CFLAGS@ @ECORE_CFLAGS@ @EINA_CXX_CFLAGS@ \
+@EO_JS_CFLAGS@ @EO_CXX_CFLAGS@ @EFL_JS_CFLAGS@
+
+tests_eolian_js_eolian_js_suite_LDADD = \
+@CHECK_LIBS@ @USE_EO_LIBS@ @USE_EINA_LIBS@ @USE_EOLIAN_LIBS@ @USE_EFL_JS_LIBS@ @USE_EVAS_LIBS@ @USE_EFL_JS_LIBS@
+tests_eolian_js_eolian_js_suite_DEPENDENCIES = @USE_EOLIAN_INTERNAL_LIBS@ @USE_EFL_JS_INTERNAL_LIBS@ @USE_EVAS_INTERNAL_LIBS@ @USE_EFL_JS_INTERNAL_LIBS@
+endif
+endif
+
+endif
+
+
+