efl/src/Makefile_Eo.am

255 lines
8.6 KiB
Plaintext
Raw Normal View History

### Library
eo_eolian_files = \
lib/eo/efl_object.eo \
lib/eo/efl_class.eo \
lib/eo/efl_object_override.eo
eo_eolian_c = $(eo_eolian_files:%.eo=%.eo.c)
eo_eolian_h = $(eo_eolian_files:%.eo=%.eo.h)
BUILT_SOURCES += \
$(eo_eolian_c) \
$(eo_eolian_h)
Eo: introducing libeo_dbg.so. This has been in the making for a very long time. Thanks to Marcel for reminding me to do it. What is it? This is a tool to help application developers debug their apps with everything Eo. Eo is strict, but not as strict as it can be. Many strict tests and debug are very expensive to implement, and we have so many hot-paths that even basic "ifs" to check if debugging is enabled will add significant overhead to normal running applications. This is why I created this library. All the expensive tests and bookkeeping should be wrapped around with "#ifdef EO_DEBUG". With this change, libeo.so is compiled twice, once normally, and once with this define set (as libeo_dbg.so). This means that normal eo code will not be affected, but if you decide to debug your application, all you need to do is: LD_PRELOAD=/path/to/libeo_dbg.so ./app Or use the convenient wrapper: eo_debug ./app Which will load the debug heavy version. What's currently there: at the moment, EO_DEBUG enables xref and data_xref and stricter tests when fetching object data. In the future, I also plan introducing "zombie objects", which essentially mean that objects are never really deleted, so you can query them long after they are gone to get more information on what they were. So if for example you have an object id that you want to query after the object has been deleted, you can. I also plan on having a way to disable/enable certain debug mode features via env vars, and maybe make the test suite link against this one instead of the normal one, and possibly add more internal hooks for the test suite to better inspect internal state? P.S: The amount of errors spewed out when running it on elementary_test makes me wish I wrote this earlier. :( @feature
2016-09-22 05:16:18 -07:00
lib_LTLIBRARIES += lib/eo/libeo.la \
lib/eo/libeo_dbg.la
installed_eomainheadersdir = $(includedir)/eo-@VMAJ@
dist_installed_eomainheaders_DATA = lib/eo/Eo.h
nodist_installed_eomainheaders_DATA = \
$(eo_eolian_h)
lib_eo_libeo_la_SOURCES = \
lib/eo/eo.c \
lib/eo/eo_ptr_indirection.c \
lib/eo/eo_ptr_indirection.h \
2014-04-02 07:34:40 -07:00
lib/eo/eo_base_class.c \
lib/eo/eo_class_class.c \
lib/eo/eo_add_fallback.c \
lib/eo/eo_add_fallback.h \
lib/eo/eo_internal.h \
lib/eo/eo_private.h
lib_eo_libeo_la_CPPFLAGS = \
-I$(top_builddir)/src/lib/efl \
@EO_CFLAGS@ \
@VALGRIND_CFLAGS@
lib_eo_libeo_la_LIBADD = @EO_LIBS@
lib_eo_libeo_la_DEPENDENCIES = @EO_INTERNAL_LIBS@
lib_eo_libeo_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
Eo: introducing libeo_dbg.so. This has been in the making for a very long time. Thanks to Marcel for reminding me to do it. What is it? This is a tool to help application developers debug their apps with everything Eo. Eo is strict, but not as strict as it can be. Many strict tests and debug are very expensive to implement, and we have so many hot-paths that even basic "ifs" to check if debugging is enabled will add significant overhead to normal running applications. This is why I created this library. All the expensive tests and bookkeeping should be wrapped around with "#ifdef EO_DEBUG". With this change, libeo.so is compiled twice, once normally, and once with this define set (as libeo_dbg.so). This means that normal eo code will not be affected, but if you decide to debug your application, all you need to do is: LD_PRELOAD=/path/to/libeo_dbg.so ./app Or use the convenient wrapper: eo_debug ./app Which will load the debug heavy version. What's currently there: at the moment, EO_DEBUG enables xref and data_xref and stricter tests when fetching object data. In the future, I also plan introducing "zombie objects", which essentially mean that objects are never really deleted, so you can query them long after they are gone to get more information on what they were. So if for example you have an object id that you want to query after the object has been deleted, you can. I also plan on having a way to disable/enable certain debug mode features via env vars, and maybe make the test suite link against this one instead of the normal one, and possibly add more internal hooks for the test suite to better inspect internal state? P.S: The amount of errors spewed out when running it on elementary_test makes me wish I wrote this earlier. :( @feature
2016-09-22 05:16:18 -07:00
### The Eo debug build
lib_eo_libeo_dbg_la_SOURCES = $(lib_eo_libeo_la_SOURCES)
lib_eo_libeo_dbg_la_CPPFLAGS = $(lib_eo_libeo_la_CPPFLAGS) -DEO_DEBUG
lib_eo_libeo_dbg_la_LIBADD = $(lib_eo_libeo_la_LIBADD)
lib_eo_libeo_dbg_la_DEPENDENCIES = $(lib_eo_libeo_la_DEPENDENCIES)
lib_eo_libeo_dbg_la_LDFLAGS = $(lib_eo_libeo_la_LDFLAGS)
bin_SCRIPTS += scripts/eo/eo_debug
######
if INSTALL_EO_FILES
eoeolianfilesdir = $(datadir)/eolian/include/eo-@VMAJ@
eoeolianfiles_DATA = \
$(eo_eolian_files) \
lib/eo/eina_types.eot # We don't generate .c/.h on purpose
endif
EXTRA_DIST2 += \
$(eo_eolian_files) \
lib/eo/eina_types.eot
### Unit tests
if EFL_ENABLE_TESTS
check_PROGRAMS += \
tests/eo/test_access \
tests/eo/test_composite_objects \
tests/eo/test_constructors \
tests/eo/test_function_overrides \
tests/eo/test_interface \
tests/eo/test_mixin \
tests/eo/test_signals \
tests/eo/test_children \
tests/eo/eo_suite_add_fallback \
tests/eo/eo_suite
tests_eo_test_children_SOURCES = \
tests/eo/children/children_main.c \
tests/eo/children/children_simple.c \
tests/eo/children/children_simple.h
tests_eo_test_children_CPPFLAGS = -I$(top_builddir)/src/lib/efl @EO_CFLAGS@
tests_eo_test_children_LDADD = @USE_EO_LIBS@
tests_eo_test_children_DEPENDENCIES = @USE_EO_INTERNAL_LIBS@
TESTS += tests/eo/test_children
tests_eo_test_access_SOURCES = \
tests/eo/access/access_inherit.c \
tests/eo/access/access_inherit.h \
tests/eo/access/access_main.c \
tests/eo/access/access_simple.c \
tests/eo/access/access_simple.h \
tests/eo/access/access_simple_protected.h
tests_eo_test_access_CPPFLAGS = -I$(top_builddir)/src/lib/efl @EO_CFLAGS@
tests_eo_test_access_LDADD = @USE_EO_LIBS@
tests_eo_test_access_DEPENDENCIES = @USE_EO_INTERNAL_LIBS@
TESTS += tests/eo/test_access
tests_eo_test_composite_objects_SOURCES = \
tests/eo/composite_objects/composite_objects_comp.c \
tests/eo/composite_objects/composite_objects_comp.h \
tests/eo/composite_objects/composite_objects_main.c \
tests/eo/composite_objects/composite_objects_simple.c \
tests/eo/composite_objects/composite_objects_simple.h
tests_eo_test_composite_objects_CPPFLAGS = -I$(top_builddir)/src/lib/efl @EO_CFLAGS@
tests_eo_test_composite_objects_LDADD = @USE_EO_LIBS@
tests_eo_test_composite_objects_DEPENDENCIES = @USE_EO_INTERNAL_LIBS@
TESTS += tests/eo/test_composite_objects
tests_eo_test_constructors_SOURCES = \
tests/eo/constructors/constructors_main.c \
tests/eo/constructors/constructors_mixin.c \
tests/eo/constructors/constructors_mixin.h \
tests/eo/constructors/constructors_simple.c \
tests/eo/constructors/constructors_simple.h \
tests/eo/constructors/constructors_simple2.c \
tests/eo/constructors/constructors_simple2.h \
tests/eo/constructors/constructors_simple3.c \
tests/eo/constructors/constructors_simple3.h \
tests/eo/constructors/constructors_simple4.c \
tests/eo/constructors/constructors_simple4.h \
tests/eo/constructors/constructors_simple5.c \
tests/eo/constructors/constructors_simple5.h \
tests/eo/constructors/constructors_simple6.c \
tests/eo/constructors/constructors_simple6.h \
tests/eo/constructors/constructors_simple7.c \
tests/eo/constructors/constructors_simple7.h
tests_eo_test_constructors_CPPFLAGS = -I$(top_builddir)/src/lib/efl @EO_CFLAGS@
tests_eo_test_constructors_LDADD = @USE_EO_LIBS@
tests_eo_test_constructors_DEPENDENCIES = @USE_EO_INTERNAL_LIBS@
TESTS += tests/eo/test_constructors
tests_eo_eo_suite_SOURCES = \
tests/eo/suite/eo_test_class_simple.c \
tests/eo/suite/eo_test_class_simple.h \
tests/eo/suite/eo_test_class_singleton.c \
tests/eo/suite/eo_test_class_singleton.h \
tests/eo/suite/eo_test_domain.c \
tests/eo/suite/eo_test_domain.h \
tests/eo/suite/eo_suite.c \
tests/eo/suite/eo_suite.h \
tests/eo/suite/eo_error_msgs.h \
tests/eo/suite/eo_error_msgs.c \
tests/eo/suite/eo_test_class_errors.c \
tests/eo/suite/eo_test_class_behaviour_errors.c \
tests/eo/suite/eo_test_call_errors.c \
tests/eo/suite/eo_test_general.c \
tests/eo/suite/eo_test_value.c \
tests/eo/suite/eo_test_event.c \
tests/eo/suite/eo_test_threaded_calls.c \
tests/eo/suite/eo_test_init.c \
tests/eo/suite/eo_test_lifecycle.c \
tests/eo/suite/eo_test_reflection.c
tests_eo_eo_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)\" \
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/eo\" \
@CHECK_CFLAGS@ \
2018-01-12 09:56:34 -08:00
@EO_CFLAGS@ \
@VALGRIND_CFLAGS@
tests_eo_eo_suite_LDADD = @CHECK_LIBS@ @USE_EO_LIBS@
tests_eo_eo_suite_DEPENDENCIES = @USE_EO_INTERNAL_LIBS@
TESTS += tests/eo/eo_suite
tests_eo_eo_suite_add_fallback_SOURCES = $(tests_eo_eo_suite_SOURCES)
tests_eo_eo_suite_add_fallback_CPPFLAGS = $(tests_eo_eo_suite_CPPFLAGS) \
-D_EO_ADD_FALLBACK_FORCE=1
tests_eo_eo_suite_add_fallback_LDADD = $(tests_eo_eo_suite_LDADD)
tests_eo_eo_suite_add_fallback_DEPENDENCIES = $(tests_eo_eo_suite_DEPENDENCIES)
TESTS += tests/eo/eo_suite_add_fallback
tests_eo_test_function_overrides_SOURCES = \
tests/eo/function_overrides/function_overrides_inherit.c \
tests/eo/function_overrides/function_overrides_inherit.h \
tests/eo/function_overrides/function_overrides_inherit2.c \
tests/eo/function_overrides/function_overrides_inherit2.h \
tests/eo/function_overrides/function_overrides_inherit3.c \
tests/eo/function_overrides/function_overrides_inherit3.h \
tests/eo/function_overrides/function_overrides_main.c \
tests/eo/function_overrides/function_overrides_simple.c \
tests/eo/function_overrides/function_overrides_simple.h
tests_eo_test_function_overrides_CPPFLAGS = -I$(top_builddir)/src/lib/efl @EO_CFLAGS@
tests_eo_test_function_overrides_LDADD = @USE_EO_LIBS@
tests_eo_test_function_overrides_DEPENDENCIES = @USE_EO_INTERNAL_LIBS@
TESTS += tests/eo/test_function_overrides
tests_eo_test_interface_SOURCES = \
tests/eo/interface/interface_interface.c \
tests/eo/interface/interface_interface.h \
tests/eo/interface/interface_interface2.c \
tests/eo/interface/interface_interface2.h \
tests/eo/interface/interface_main.c \
tests/eo/interface/interface_simple.c \
tests/eo/interface/interface_simple.h
tests_eo_test_interface_CPPFLAGS = -I$(top_builddir)/src/lib/efl @EO_CFLAGS@
tests_eo_test_interface_LDADD = @USE_EO_LIBS@
tests_eo_test_interface_DEPENDENCIES = @USE_EO_INTERNAL_LIBS@
TESTS += tests/eo/test_interface
tests_eo_test_mixin_SOURCES = \
tests/eo/mixin/mixin_inherit.c \
tests/eo/mixin/mixin_inherit.h \
tests/eo/mixin/mixin_main.c \
tests/eo/mixin/mixin_mixin.c \
tests/eo/mixin/mixin_mixin.h \
tests/eo/mixin/mixin_mixin2.c \
tests/eo/mixin/mixin_mixin2.h \
tests/eo/mixin/mixin_mixin3.c \
tests/eo/mixin/mixin_mixin3.h \
tests/eo/mixin/mixin_mixin4.c \
tests/eo/mixin/mixin_mixin4.h \
tests/eo/mixin/mixin_simple.c \
tests/eo/mixin/mixin_simple.h
tests_eo_test_mixin_CPPFLAGS = -I$(top_builddir)/src/lib/efl @EO_CFLAGS@
tests_eo_test_mixin_LDADD = @USE_EO_LIBS@
tests_eo_test_mixin_DEPENDENCIES = @USE_EO_INTERNAL_LIBS@
TESTS += tests/eo/test_mixin
tests_eo_test_signals_SOURCES = \
tests/eo/signals/signals_main.c \
tests/eo/signals/signals_simple.c \
tests/eo/signals/signals_simple.h
tests_eo_test_signals_CPPFLAGS = -I$(top_builddir)/src/lib/efl @EO_CFLAGS@
tests_eo_test_signals_LDADD = @USE_EO_LIBS@
tests_eo_test_signals_DEPENDENCIES = @USE_EO_INTERNAL_LIBS@
TESTS += tests/eo/test_signals
endif
EXTRA_DIST2 += \
tests/eo/eunit_tests.h \
tests/eo/suite/eo_test_reflection_complex_class_structure.c \
tests/eo/suite/eo_test_reflection_complex_class_structure.h \
lib/eo/eo_ptr_indirection.x
if HAVE_JS
generated_eo_js_bindings = $(eo_eolian_files:%.eo=%.eo.js.cc)
GENERATED_JS_BINDINGS += $(generated_eo_js_bindings)
endif
2017-12-13 06:36:21 -08:00
if HAVE_CXX
eo_eolian_cxx_hh = $(eo_eolian_files:%.eo=%.eo.hh)
eo_eolian_cxx_impl_hh = $(eo_eolian_files:%.eo=%.eo.impl.hh)
endif