aboutsummaryrefslogtreecommitdiffstats
path: root/src/Makefile_Edje_Cxx.am
blob: aa33002ba9b87611dff8a36fae36dc4059c31dc5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

if HAVE_CXX11

### Generated headers
generated_edje_cxx_bindings = $(edje_eolian_files:%.eo=%.eo.hh)
generated_edje_cxx_impl_bindings = $(edje_eolian_files:%.eo=%.eo.impl.hh)

lib/edje/Edje.hh: $(generated_edje_cxx_bindings)
	@echo @ECHO_E@ "#ifndef EFL_CXX_EDJE_HH\n#define EFL_CXX_EDJE_HH\n" > $(top_builddir)/src/lib/edje/Edje.hh
	@echo @ECHO_E@ "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/edje/Edje.hh
	@for i in $(generated_edje_cxx_bindings); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/edje/Edje.hh; done
	@echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/edje/Edje.hh

generated_edje_cxx_all = \
	$(generated_edje_cxx_bindings) \
	$(generated_edje_cxx_impl_bindings) \
	lib/edje/Edje.hh

CLEANFILES += $(generated_edje_cxx_all)

installed_edjecxxmainheadersdir = $(includedir)/edje-cxx-@VMAJ@/
nodist_installed_edjecxxmainheaders_DATA = $(generated_edje_cxx_all)

### Unit tests

if EFL_ENABLE_TESTS

check_PROGRAMS += tests/edje_cxx/cxx_compile_test
TESTS += tests/edje_cxx/cxx_compile_test

tests_edje_cxx_cxx_compile_test_SOURCES = tests/edje_cxx/cxx_compile_test.cc
tests_edje_cxx_cxx_compile_test_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_builddir)/src/lib/evas/canvas/ \
-I$(top_builddir)/src/lib/efl/interfaces/ \
-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/edje_cxx\" \
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/edje_cxx\" \
@CHECK_CFLAGS@ @ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EDJE_CXX_CFLAGS@ @EO_CXX_CFLAGS@ \
@ECORE_CFLAGS@ @EINA_CFLAGS@ @EVAS_CFLAGS@ @EDJE_CFLAGS@ @EO_CFLAGS@
tests_edje_cxx_cxx_compile_test_LDADD = @CHECK_LIBS@ @USE_EDJE_LIBS@
tests_edje_cxx_cxx_compile_test_DEPENDENCIES = @USE_EDJE_INTERNAL_LIBS@

check-edje-cxx:
	check_PROGRAMS=tests/edje_cxx/cxx_compile_test
	make check TESTS=tests/edje_cxx/cxx_compile_test

check-edje-cxx: override DISABLE_SUBTESTS = 0

endif

endif