summaryrefslogtreecommitdiff
path: root/src/Makefile_Efl_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_Efl_Js.am
parent1a3cb45f1cc7fdf8d481879e6bd7349d9cb0b3fa (diff)
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_Efl_Js.am')
-rw-r--r--src/Makefile_Efl_Js.am333
1 files changed, 333 insertions, 0 deletions
diff --git a/src/Makefile_Efl_Js.am b/src/Makefile_Efl_Js.am
new file mode 100644
index 0000000000..e993120a64
--- /dev/null
+++ b/src/Makefile_Efl_Js.am
@@ -0,0 +1,333 @@
1if HAVE_JS
2
3if HAVE_NODEJS
4
5noinst_lib_LTLIBRARIES = lib/efl_js/libefl_node_js.la
6noinst_libdir = $(libdir)/efl_js
7
8$(top_builddir)/src/lib/efl_js/efl.node: lib/efl_js/libefl_node_js.la
9 $(AM_V_CP)$(CP) $(top_builddir)/src/lib/efl_js/.libs/libefl_node_js.so $(top_builddir)/src/lib/efl_js/efl.node
10
11eflnodedir = $(libdir)/node_modules
12eflnode_DATA = $(top_builddir)/src/lib/efl_js/efl.node
13
14CLEANFILES += ${eflnodedir_DATA}
15EXTRA_DIST += ${eflnodedir_DATA}
16
17efljsmimedir = @XDG_DATA_HOME@/mime/packages
18efljsmime_DATA = bin/efl_js/efljslaunch.xml
19
20efljsdesktopdir = @XDG_DATA_HOME@/applications
21efljsdesktop_DATA = bin/efl_js/efljslaunch.desktop
22
23bin_SCRIPTS += \
24 bin/efl_js/efljslaunch \
25 bin/efl_js/efljspack
26
27else
28
29bin_PROGRAMS += bin/efl_js/eflv8js
30
31bin_efl_js_eflv8js_SOURCES = \
32 bin/efl_js/launcher_main.cc
33
34bin_efl_js_eflv8js_CPPFLAGS = \
35 -I$(top_builddir)/src/lib/efl \
36 -I$(top_srcdir)/src/bindings/js/efl_js \
37 -I$(top_srcdir)/src/bindings/js/eina_js \
38 -I$(top_srcdir)/src/bindings/js/eo_js \
39 @CHECK_CFLAGS@ \
40 @EINA_CXX_CFLAGS@ \
41 @EO_CXX_CFLAGS@ \
42 @EMILE_CFLAGS@ \
43 @ECORE_CFLAGS@ \
44 @EET_CFLAGS@ \
45 @EO_CFLAGS@ \
46 @EFL_JS_CFLAGS@ \
47 @EINA_JS_CFLAGS@ \
48 @EO_JS_CFLAGS@
49
50bin_efl_js_eflv8js_LDFLAGS = \
51 -lv8 \
52 @USE_EFL_JS_INTERNAL_LIBS@
53
54bin_efl_js_eflv8js_LDADD = \
55 @USE_EFL_JS_LIBS@
56
57endif
58
59bindings/js/efl_js/eolian_js_bindings.cc: $(GENERATED_JS_BINDINGS)
60 @echo @ECHO_E@ "#ifdef HAVE_CONFIG_H" > $(top_builddir)/src/bindings/js/efl_js/eolian_js_bindings.cc
61 @echo @ECHO_E@ "#include \"config.h\"" >> $(top_builddir)/src/bindings/js/efl_js/eolian_js_bindings.cc
62 @echo @ECHO_E@ "#endif\n" >> $(top_builddir)/src/bindings/js/efl_js/eolian_js_bindings.cc
63 @echo @ECHO_E@ "#include <Efl.h>" >> $(top_builddir)/src/bindings/js/efl_js/eolian_js_bindings.cc
64 @echo @ECHO_E@ "#include <Efl_Config.h>" >> $(top_builddir)/src/bindings/js/efl_js/eolian_js_bindings.cc
65 @echo @ECHO_E@ "#include <Ecore.h>" >> $(top_builddir)/src/bindings/js/efl_js/eolian_js_bindings.cc
66 @echo @ECHO_E@ "#include <Eo.h>" >> $(top_builddir)/src/bindings/js/efl_js/eolian_js_bindings.cc
67 @echo @ECHO_E@ "#include <Ecore_Con.h>" >> $(top_builddir)/src/bindings/js/efl_js/eolian_js_bindings.cc
68 @echo @ECHO_E@ "#include <Ecore_Audio.h>" >> $(top_builddir)/src/bindings/js/efl_js/eolian_js_bindings.cc
69 @echo @ECHO_E@ "#include <Evas.h>" >> $(top_builddir)/src/bindings/js/efl_js/eolian_js_bindings.cc
70 @echo @ECHO_E@ "#include <Edje.h>" >> $(top_builddir)/src/bindings/js/efl_js/eolian_js_bindings.cc
71 @echo @ECHO_E@ "#include <Ecore_Con_Eet.h>" >> $(top_builddir)/src/bindings/js/efl_js/eolian_js_bindings.cc
72 @echo @ECHO_E@ "#include <Emotion.h>\n" >> $(top_builddir)/src/bindings/js/efl_js/eolian_js_bindings.cc
73 @for i in $(GENERATED_JS_BINDINGS); do echo "#include <$$i>" >> $(top_builddir)/src/bindings/js/efl_js/eolian_js_bindings.cc; done
74
75CLEANFILES += bindings/js/efl_js/eolian_js_bindings.cc
76
77## Install Ecore-JS headers
78installed_ecorejsheadersdir = $(includedir)/ecore-js-@VMAJ@
79dist_installed_ecorejsheaders_DATA = \
80bindings/js/ecore_js/Ecore_Js.hh
81
82## Install Eio-JS headers
83installed_eiojsheadersdir = $(includedir)/eio-js-@VMAJ@
84dist_installed_eiojsheaders_DATA = \
85bindings/js/eio_js/Eio_Js.hh
86
87## Install Ethumb-JS headers
88installed_ethumbjsheadersdir = $(includedir)/ethumb-js-@VMAJ@
89dist_installed_ethumbjsheaders_DATA = \
90bindings/js/ethumb_js/Ethumb_Js.hh
91
92## Install Eldbus-JS headers
93installed_eldbusjsheadersdir = $(includedir)/eldbus-js-@VMAJ@
94dist_installed_eldbusjsheaders_DATA = \
95bindings/js/eldbus_js/Eldbus_Js.hh
96
97## Install Eo-JS headers
98installed_eojsmainheadersdir = $(includedir)/eo-js-@VMAJ@
99dist_installed_eojsmainheaders_DATA = \
100bindings/js/eo_js/eo_js_call_function.hh \
101bindings/js/eo_js/eo_js_constructor.hh \
102bindings/js/eo_js/eo_js_direction.hh \
103bindings/js/eo_js/eo_js_event.hh \
104bindings/js/eo_js/eo_js_namespace.hh \
105bindings/js/eo_js/eo_js_struct.hh \
106bindings/js/eo_js/eo_js_construct_from_eo.hh \
107bindings/js/eo_js/Eo_Js.hh
108
109## Install Eina-JS headers
110installed_einajsheadersdir = $(includedir)/eina-js-@VMAJ@
111dist_installed_einajsheaders_DATA = \
112bindings/js/eina_js/Eina_Js.hh \
113bindings/js/eina_js/eina_js_accessor.hh \
114bindings/js/eina_js/eina_js_array.hh \
115bindings/js/eina_js/eina_js_compatibility.hh \
116bindings/js/eina_js/eina_js_container.hh \
117bindings/js/eina_js/eina_js_error.hh \
118bindings/js/eina_js/eina_js_get_value_from_c.hh \
119bindings/js/eina_js/eina_js_get_value.hh \
120bindings/js/eina_js/eina_js_iterator.hh \
121bindings/js/eina_js/eina_js_list.hh \
122bindings/js/eina_js/eina_js_log.hh \
123bindings/js/eina_js/eina_js_node.hh \
124bindings/js/eina_js/eina_js_value.hh
125
126installed_efljsheadersdir = $(includedir)/efl-js-@VMAJ@
127dist_installed_efljsheaders_DATA = \
128bindings/js/efl_js/Efl_Js.hh
129
130lib_LTLIBRARIES += lib/efl_js/libefl_js.la
131
132lib_efl_js_libefl_js_la_SOURCES = \
133bindings/js/eina_js/eina_js_container.cc \
134bindings/js/eina_js/eina_js_value.cc \
135bindings/js/eina_js/eina_js_error.cc \
136bindings/js/eina_js/eina_js_accessor.cc \
137bindings/js/eina_js/eina_js_log.cc \
138bindings/js/eina_js/eina_js_iterator.cc \
139bindings/js/eina_js/eina_js_compatibility.cc \
140bindings/js/ecore_js/ecore_js_init.cc \
141bindings/js/ecore_js/ecore_js_mainloop.cc \
142bindings/js/ecore_js/ecore_js_timer.cc \
143bindings/js/ecore_js/ecore_js_event.cc \
144bindings/js/ecore_js/ecore_js_job.cc \
145bindings/js/ecore_js/ecore_js_idle.cc \
146bindings/js/ecore_js/ecore_js_animator.cc \
147bindings/js/ecore_js/ecore_js_poller.cc \
148bindings/js/ecore_js/ecore_js_throttle.cc \
149bindings/js/eldbus_js/eldbus_js_core.cc \
150bindings/js/eldbus_js/eldbus_js_connection.cc \
151bindings/js/eldbus_js/eldbus_js_message.cc \
152bindings/js/eldbus_js/eldbus_js_object_mapper.cc \
153bindings/js/eio_js/eio_js.cc \
154bindings/js/ethumb_js/ethumb_js_client.cc
155
156nodist_lib_efl_js_libefl_js_la_SOURCES = \
157bindings/js/efl_js/eolian_js_bindings.cc
158
159bindings/js/efl_js/efl_js.cc $(lib_efl_js_libefl_js_la_SOURCES): $(generated_ecore_cxx_all) $(generated_eo_cxx_bindings) $(generated_efl_cxx_all)
160
161lib_efl_js_libefl_js_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
162-I$(top_srcdir)/src/lib/efl \
163-I$(top_builddir)/src/lib/efl/interfaces/ \
164-I$(top_builddir)/src/lib/evas/canvas/ \
165-I$(top_srcdir)/src/bindings/js/eina_js \
166-I$(top_srcdir)/src/bindings/js/ecore_js \
167-I$(top_srcdir)/src/bindings/js/eo_js \
168-I$(top_srcdir)/src/bindings/js/eldbus_js \
169-I$(top_srcdir)/src/bindings/js/eio_js \
170-I$(top_srcdir)/src/bindings/js/ethumb_js \
171@EFL_JS_CFLAGS@ \
172@EO_JS_CFLAGS@ \
173@ECORE_CXX_CFLAGS@ \
174@EO_CXX_CFLAGS@ \
175@ECORE_JS_CFLAGS@ \
176@EINA_JS_CFLAGS@ \
177@ELDBUS_JS_CFLAGS@ \
178@EIO_JS_CFLAGS@ \
179@ETHUMB_JS_CFLAGS@ \
180@EINA_CXX_CFLAGS@
181lib_efl_js_libefl_js_la_LIBADD = @EFL_JS_LIBS@
182lib_efl_js_libefl_js_la_DEPENDENCIES = @EFL_JS_INTERNAL_LIBS@
183lib_efl_js_libefl_js_la_LIBTOOLFLAGS = --tag=disable-static
184lib_efl_js_libefl_js_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
185
186if HAVE_NODEJS
187lib_efl_js_libefl_node_js_la_SOURCES = \
188bindings/js/efl_js/efl_js.cc
189
190lib_efl_js_libefl_node_js_la_CPPFLAGS = $(lib_efl_js_libefl_js_la_CPPFLAGS)
191lib_efl_js_libefl_node_js_la_LIBADD = @USE_EFL_JS_LIBS@
192lib_efl_js_libefl_node_js_la_DEPENDENCIES = @USE_EFL_JS_INTERNAL_LIBS@
193lib_efl_js_libefl_node_js_la_LIBTOOLFLAGS = --tag=disable-static
194lib_efl_js_libefl_node_js_la_LDFLAGS =
195else
196lib_efl_js_libefl_js_la_SOURCES += \
197bindings/js/efl_js/efl_js.cc
198endif
199
200if EFL_ENABLE_TESTS
201
202SUITE_RUNNER_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
203-I$(top_srcdir)/src/bindings/js/eina_js \
204-I$(top_srcdir)/src/bindings/js/eo_js \
205-DTESTS_WD=\"`pwd`\" \
206-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/efl_js\" \
207-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)/src/tests/efl_js\" \
208-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/efl_js\" \
209@CHECK_CFLAGS@ \
210@EFL_JS_CFLAGS@ \
211@EINA_CXX_CFLAGS@ \
212@EO_CXX_CFLAGS@ \
213@EO_CFLAGS@ \
214@ECORE_CFLAGS@ \
215@ECORE_CXX_CFLAGS@ \
216@ECORE_JS_CFLAGS@ \
217@EINA_JS_CFLAGS@
218
219if HAVE_NODEJS
220TESTS += tests/efl_js/eina_js_suite.js \
221tests/efl_js/eina_js_containers_suite.js \
222tests/efl_js/ecore_js_suite.js \
223tests/efl_js/eldbus_js_suite.js \
224tests/efl_js/ethumb_js_suite.js \
225tests/efl_js/eio_js_suite.js \
226tests/efl_js/benchmark_js_suite.js
227
228check_LTLIBRARIES += tests/efl_js/libbenchmark_object.la
229
230tests/efl_js/eina_js_suite.js tests/efl_js/eina_js_containers_suite.js tests/efl_js/ecore_js_suite.js tests/efl_js/eldbus_js_suite.js tests/efl_js/eio_js_suite.js tests/efl_js/ethumb_js_suite.js: $(top_builddir)/src/lib/efl_js/efl.node
231
232tests/efl_js/benchmark_object.node: tests/efl_js/libbenchmark_object.la
233 $(AM_V_CP)$(CP) $(top_builddir)/src/tests/efl_js/.libs/libbenchmark_object.so $(top_builddir)/src/tests/efl_js/benchmark_object.node
234tests/efl_js/benchmark_js_suite.js: $(top_builddir)/src/lib/efl_js/efl.node tests/efl_js/benchmark_object.node
235
236tests_efl_js_libbenchmark_object_la_SOURCES = tests/efl_js/benchmark_object_impl.cc
237tests_efl_js_libbenchmark_object_la_CPPFLAGS = \
238-I$(top_builddir)/src/lib/efl \
239-I$(top_srcdir)/src/bindings/js/efl_js \
240-I$(top_builddir)/src/tests/efl_js \
241-I$(top_srcdir)/src/bindings/js/eina_js \
242-I$(top_srcdir)/src/bindings/js/eo_js \
243-DTESTS_WD=\"`pwd`\" \
244-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/efl_js\" \
245-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)/src/tests/efl_js\" \
246-DPACKAGE_DATA_DIR=\"$(datadir)/efl_js\" \
247-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/efl_js\" \
248@CHECK_CFLAGS@ @EOLIAN_CXX_CFLAGS@ @EINA_JS_CFLAGS@ @EO_JS_CFLAGS@ \
249@EOLIAN_CFLAGS@ @EINA_CFLAGS@ @EO_CFLAGS@ @ECORE_CFLAGS@ @EINA_CXX_CFLAGS@ \
250@EO_JS_CFLAGS@ @EO_CXX_CFLAGS@
251tests_efl_js_libbenchmark_object_la_LIBADD = \
252@CHECK_LIBS@ @USE_EO_LIBS@ @USE_EINA_LIBS@ @USE_EOLIAN_LIBS@ @USE_EFL_JS_LIBS@
253tests_efl_js_libbenchmark_object_la_LDFLAGS = -rpath $(abs_top_builddir)/tests/efl_js @EFL_LTLIBRARY_FLAGS@
254tests_efl_js_libbenchmark_object_la_DEPENDENCIES = @USE_EINA_INTERNAL_LIBS@ @USE_EO_INTERNAL_LIBS@ @USE_EFL_JS_INTERNAL_LIBS@
255tests_efl_js_libbenchmark_object_la_LIBTOOLFLAGS = --tag=disable-static
256
257tests/efl_js/tests_efl_js_libbenchmark_object_la-benchmark_object_impl.l$(OBJEXT): tests/efl_js/benchmark_object.eo.js.cc tests/efl_js/benchmark_object.eo.c tests/efl_js/benchmark_object.eo.h
258else
259check_PROGRAMS += \
260tests/efl_js/eina_js_suite \
261tests/efl_js/eina_js_containers_suite \
262tests/efl_js/ecore_js_suite \
263tests/efl_js/eldbus_js_suite \
264tests/efl_js/ethumb_js_suite \
265tests/efl_js/eio_js_suite \
266tests/efl_js/benchmark_js_suite
267TESTS += tests/efl_js/eina_js_suite \
268tests/efl_js/ecore_js_suite \
269tests/efl_js/eldbus_js_suite \
270tests/efl_js/ethumb_js_suite \
271tests/efl_js/eio_js_suite \
272tests/efl_js/benchmark_js_suite
273
274tests_efl_js_eina_js_suite_SOURCES = \
275tests/efl_js/eina_js_suite.cc
276
277tests_efl_js_eina_js_suite_CPPFLAGS = $(SUITE_RUNNER_CPPFLAGS)
278tests_efl_js_eina_js_suite_LDADD = \
279@CHECK_LIBS@ @USE_EO_LIBS@ @USE_EINA_LIBS@ @USE_EOLIAN_LIBS@ @USE_EFL_JS_LIBS@
280tests_efl_js_eina_js_suite_DEPENDENCIES = @USE_EINA_INTERNAL_LIBS@ @USE_EO_INTERNAL_LIBS@ @USE_EFL_JS_INTERNAL_LIBS@
281
282tests_efl_js_eina_js_containers_suite_SOURCES = \
283tests/efl_js/eina_js_containers_suite.cc
284
285tests_efl_js_eina_js_containers_suite_CPPFLAGS = $(SUITE_RUNNER_CPPFLAGS)
286tests_efl_js_eina_js_containers_suite_LDADD = \
287@CHECK_LIBS@ @USE_EO_LIBS@ @USE_EINA_LIBS@ @USE_EOLIAN_LIBS@ @USE_EFL_JS_LIBS@
288tests_efl_js_eina_js_containers_suite_DEPENDENCIES = @USE_EINA_INTERNAL_LIBS@ @USE_EO_INTERNAL_LIBS@ @USE_EFL_JS_INTERNAL_LIBS@
289
290tests_efl_js_ecore_js_suite_SOURCES = \
291tests/efl_js/ecore_js_suite.cc
292
293tests_efl_js_ecore_js_suite_CPPFLAGS = $(SUITE_RUNNER_CPPFLAGS)
294tests_efl_js_ecore_js_suite_LDADD = \
295@CHECK_LIBS@ @USE_EO_LIBS@ @USE_EINA_LIBS@ @USE_EOLIAN_LIBS@ @USE_EFL_JS_LIBS@
296tests_efl_js_ecore_js_suite_DEPENDENCIES = @USE_EINA_INTERNAL_LIBS@ @USE_EO_INTERNAL_LIBS@ @USE_EFL_JS_INTERNAL_LIBS@
297
298tests_efl_js_eldbus_js_suite_SOURCES = \
299tests/efl_js/eldbus_js_suite.cc
300
301tests_efl_js_eldbus_js_suite_CPPFLAGS = $(SUITE_RUNNER_CPPFLAGS)
302tests_efl_js_eldbus_js_suite_LDADD = \
303@CHECK_LIBS@ @USE_EO_LIBS@ @USE_EINA_LIBS@ @USE_EOLIAN_LIBS@ @USE_EFL_JS_LIBS@
304tests_efl_js_eldbus_js_suite_DEPENDENCIES = @USE_EINA_INTERNAL_LIBS@ @USE_EO_INTERNAL_LIBS@ @USE_EFL_JS_INTERNAL_LIBS@
305
306tests_efl_js_ethumb_js_suite_SOURCES = \
307tests/efl_js/ethumb_js_suite.cc
308
309tests_efl_js_ethumb_js_suite_CPPFLAGS = $(SUITE_RUNNER_CPPFLAGS)
310tests_efl_js_ethumb_js_suite_LDADD = \
311@CHECK_LIBS@ @USE_EO_LIBS@ @USE_EINA_LIBS@ @USE_EOLIAN_LIBS@ @USE_EFL_JS_LIBS@
312tests_efl_js_ethumb_js_suite_DEPENDENCIES = @USE_EINA_INTERNAL_LIBS@ @USE_EO_INTERNAL_LIBS@ @USE_EFL_JS_INTERNAL_LIBS@
313
314tests_efl_js_eio_js_suite_SOURCES = \
315tests/efl_js/eio_js_suite.cc
316
317tests_efl_js_eio_js_suite_CPPFLAGS = $(SUITE_RUNNER_CPPFLAGS)
318tests_efl_js_eio_js_suite_LDADD = \
319@CHECK_LIBS@ @USE_EO_LIBS@ @USE_EINA_LIBS@ @USE_EOLIAN_LIBS@ @USE_EFL_JS_LIBS@
320tests_efl_js_eio_js_suite_DEPENDENCIES = @USE_EINA_INTERNAL_LIBS@ @USE_EO_INTERNAL_LIBS@ @USE_EFL_JS_INTERNAL_LIBS@
321
322tests_efl_js_benchmark_js_suite_SOURCES = \
323tests/efl_js/benchmark_js_suite.cc
324
325tests_efl_js_benchmark_js_suite_CPPFLAGS = $(SUITE_RUNNER_CPPFLAGS)
326tests_efl_js_benchmark_js_suite_LDADD = \
327@CHECK_LIBS@ @USE_EO_LIBS@ @USE_EINA_LIBS@ @USE_EOLIAN_LIBS@ @USE_EFL_JS_LIBS@
328tests_efl_js_benchmark_js_suite_DEPENDENCIES = @USE_EINA_INTERNAL_LIBS@ @USE_EO_INTERNAL_LIBS@ @USE_EFL_JS_INTERNAL_LIBS@
329endif
330endif
331
332
333endif