summaryrefslogtreecommitdiff
path: root/src/Makefile_Ecore_Cxx.am
blob: 83981658a34aa431c2b143c538db93b3343e7e8a (plain)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76

### Library

if HAVE_CXX11

installed_ecorecxxmainheadersdir = $(includedir)/ecore-cxx-@VMAJ@
dist_installed_ecorecxxmainheaders_DATA = bindings/ecore_cxx/Ecore.hh

generated_ecore_cxx_bindings = $(ecore_eolian_files:%.eo=%.eo.hh)
generated_ecore_cxx_impl_bindings = $(ecore_eolian_files:%.eo=%.eo.impl.hh)

lib/ecore/Ecore.eo.hh: $(generated_ecore_cxx_bindings)
	@echo @ECHO_E@ "#ifndef EFL_CXX_ECORE_HH\n#define EFL_CXX_ECORE_HH\n" > $(top_builddir)/src/lib/ecore/Ecore.eo.hh
	@echo @ECHO_E@ "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/ecore/Ecore.eo.hh
	@for i in $(generated_ecore_cxx_bindings); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/ecore/Ecore.eo.hh; done
	@echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/ecore/Ecore.eo.hh

generated_ecore_cxx_all = \
	$(generated_ecore_cxx_bindings) \
	$(generated_ecore_cxx_impl_bindings) \
	lib/ecore/Ecore.eo.hh

CLEANFILES += $(generated_ecore_cxx_all)

installed_ecorecxxheadersdir = $(includedir)/ecore-cxx-@VMAJ@
nodist_installed_ecorecxxheaders_DATA = $(generated_ecore_cxx_all)

### Unit tests

if EFL_ENABLE_TESTS

check_PROGRAMS += tests/ecore_cxx/ecore_cxx_suite tests/ecore_cxx/cxx_compile_test
TESTS += tests/ecore_cxx/ecore_cxx_suite tests/ecore_cxx/cxx_compile_test

tests_ecore_cxx_ecore_cxx_suite_SOURCES = \
tests/ecore_cxx/ecore_cxx_suite.cc \
tests/ecore_cxx/ecore_cxx_test_safe_call.cc

tests_ecore_cxx_ecore_cxx_suite_CPPFLAGS = \
-I$(top_builddir)/src/lib/efl \
-I$(top_builddir)/src/lib/efl/interfaces \
-I$(top_builddir)/src/lib/ecore \
-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/ecore_cxx\" \
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/ecore_cxx\" \
@CHECK_CFLAGS@ @ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EINA_CFLAGS@ \
@ECORE_CFLAGS@ @EO_CFLAGS@ @EO_CXX_CFLAGS@

tests_ecore_cxx_ecore_cxx_suite_LDADD = @CHECK_LIBS@ @USE_ECORE_LIBS@
tests_ecore_cxx_ecore_cxx_suite_DEPENDENCIES = @USE_ECORE_INTERNAL_LIBS@

tests_ecore_cxx_cxx_compile_test_SOURCES = tests/ecore_cxx/cxx_compile_test.cc
tests_ecore_cxx_cxx_compile_test_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_builddir)/src/lib/ecore \
-I$(top_builddir)/src/lib/efl/interfaces/ \
-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/ecore_cxx\" \
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/ecore_cxx\" \
@CHECK_CFLAGS@ @ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EINA_CFLAGS@ \
@ECORE_CFLAGS@ @EO_CFLAGS@ @EO_CXX_CFLAGS@

tests_ecore_cxx_cxx_compile_test_LDADD = @CHECK_LIBS@ @USE_ECORE_LIBS@
tests_ecore_cxx_cxx_compile_test_DEPENDENCIES = @USE_ECORE_INTERNAL_LIBS@

check-ecore-cxx:
	check_PROGRAMS=tests/ecore_cxx/ecore_cxx_suite
	make check TESTS=tests/ecore_cxx/ecore_cxx_suite

check-ecore-cxx: override DISABLE_SUBTESTS = 0

check-ecore-cxx-compile:
	check_PROGRAMS=tests/ecore_cxx/cxx_compile_test
	make check TESTS=tests/ecore_cxx/cxx_compile_test

check-ecore-cxx-compile: override DISABLE_SUBTESTS = 0

endif
endif