###################### EFL ######################
+#### Platform-dependent
+DL_LIBS=""
#### Evil
+USE_EVIL_CFLAGS=""
+USE_EVIL_LIBS=""
+
if test "x${have_windows}" = "xyes" ; then
AC_MSG_NOTICE([Evil checks])
fi
platform_libs="${platform_libs} ${platform_libs_evil}"
+USE_EVIL_CFLAGS="-I\$(top_srcdir)/src/lib/evil"
+USE_EVIL_LIBS="lib/evil/libevil.la"
+DL_LIBS="lib/evil/libdl.la"
fi
+AC_SUBST([USE_EVIL_CFLAGS])
+AC_SUBST([USE_EVIL_LIBS])
+
#### End of Evil
#### End of Escape
+AC_SUBST([DL_LIBS])
+#### End of Platform-dependent
+
#### Eina
-DEFL_ECORE_BUILD \
@EFL_CFLAGS@ \
@EFL_COV_CFLAGS@ \
-@ECORE_CFLAGS@
-
-if HAVE_WINDOWS
-lib_ecore_libecore_la_CPPFLAGS += \
--I$(top_srcdir)/src/lib/evil
-endif
+@ECORE_CFLAGS@ \
+@USE_EVIL_CFLAGS@
if HAVE_PS3
lib_ecore_libecore_la_CPPFLAGS += \
lib_ecore_libecore_la_LIBADD = \
lib/eo/libeo.la \
-lib/eina/libeina.la
-
-if HAVE_WINDOWS
-lib_ecore_libecore_la_LIBADD += lib/evil/libevil.la
-endif
+lib/eina/libeina.la \
+@USE_EVIL_LIBS@
if HAVE_PS3
lib_ecore_libecore_la_LIBADD += lib/escape/libescape.la
-DEFL_ECORE_CON_BUILD \
@EFL_CFLAGS@ \
@EFL_COV_CFLAGS@ \
-@ECORE_CON_CFLAGS@
-
-if HAVE_WINDOWS
-lib_ecore_con_libecore_con_la_CPPFLAGS += \
--I$(top_srcdir)/src/lib/evil
-endif
+@ECORE_CON_CFLAGS@ \
+@USE_EVIL_CFLAGS@
lib_ecore_con_libecore_con_la_LIBADD = \
lib/ecore/libecore.la \
lib/eet/libeet.la \
lib/eo/libeo.la \
-lib/eina/libeina.la
-
-if HAVE_WINDOWS
-lib_ecore_con_libecore_con_la_LIBADD += lib/evil/libevil.la
-endif
+lib/eina/libeina.la \
+@USE_EVIL_LIBS@
lib_ecore_con_libecore_con_la_LIBADD += @ECORE_CON_LIBS@ @EFL_COV_LIBS@ -lm
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DEFL_ECORE_EVAS_BUILD \
@EFL_CFLAGS@ \
-@EFL_COV_CFLAGS@
-
-if HAVE_WINDOWS
-lib_ecore_evas_libecore_evas_la_CPPFLAGS += \
--I$(top_srcdir)/src/lib/evil
-endif
+@EFL_COV_CFLAGS@ \
+@USE_EVIL_CFLAGS@
lib_ecore_evas_libecore_evas_la_LIBADD = \
lib/ecore_input/libecore_input_evas.la \
-DEFL_EET_BUILD \
@EFL_CFLAGS@ \
@EFL_COV_CFLAGS@ \
-@EET_CFLAGS@
-
-if HAVE_WINDOWS
-lib_eet_libeet_la_CPPFLAGS += \
--I$(top_srcdir)/src/lib/evil
-endif
-
-lib_eet_libeet_la_LIBADD = lib/eina/libeina.la
+@EET_CFLAGS@ \
+@USE_EVIL_CFLAGS@
-if HAVE_WINDOWS
-lib_eet_libeet_la_LIBADD += lib/evil/libevil.la
-endif
-
-lib_eet_libeet_la_LIBADD += @EET_LIBS@ @EFL_COV_LIBS@ -lm
+lib_eet_libeet_la_LIBADD = \
+lib/eina/libeina.la \
+@USE_EVIL_LIBS@ \
+@EET_LIBS@ \
+@EFL_COV_LIBS@ \
+-lm
lib_eet_libeet_la_LDFLAGS = -no-undefined -version-info @version_info@ @release_info@
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
@EFL_CFLAGS@ \
@EFL_COV_CFLAGS@ \
-@EET_CFLAGS@
-
-if HAVE_WINDOWS
-bin_eet_eet_CPPFLAGS += \
--I$(top_srcdir)/src/lib/evil
-endif
+@EET_CFLAGS@ \
+@USE_EVIL_CFLAGS@
bin_eet_eet_LDADD = \
lib/eet/libeet.la \
-lib/eina/libeina.la
-
-if HAVE_WINDOWS
-bin_eet_eet_LDADD += lib/evil/libevil.la
-endif
-
-bin_eet_eet_LDADD += @EET_LIBS@ @EFL_COV_LIBS@
+lib/eina/libeina.la \
+@USE_EVIL_LIBS@ \
+@EET_LIBS@ \
+@EFL_COV_LIBS@
### Unit tests
@EFL_CFLAGS@ \
@EFL_COV_CFLAGS@ \
@EFL_PTHREAD_CFLAGS@ \
-@EINA_CFLAGS@
-
-if HAVE_WINDOWS
-lib_eina_libeina_la_CPPFLAGS += \
--I$(top_srcdir)/src/lib/evil
-endif
-
-lib_eina_libeina_la_LIBADD = @EINA_LIBS@ @EFL_COV_LIBS@
-
-if HAVE_WINDOWS
-lib_eina_libeina_la_LIBADD += \
-lib/evil/libevil.la \
-lib/evil/libdl.la
-endif
+@EINA_CFLAGS@ \
+@USE_EVIL_CFLAGS@
-lib_eina_libeina_la_LIBADD += -lm
+lib_eina_libeina_la_LIBADD = @EINA_LIBS@ @EFL_COV_LIBS@ @USE_EVIL_LIBS@ @DL_LIBS@ -lm
lib_eina_libeina_la_LDFLAGS = -no-undefined -version-info @version_info@ @release_info@ @EFL_PTHREAD_LIBS@
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/embryo\" \
-DEFL_EMBRYO_BUILD \
-@EFL_CFLAGS@
+@EFL_CFLAGS@ \
+@USE_EVIL_CFLAGS@
-if HAVE_WINDOWS
-lib_embryo_libembryo_la_CPPFLAGS += \
--I$(top_srcdir)/src/lib/evil
-endif
-
-lib_embryo_libembryo_la_LIBADD = lib/eina/libeina.la
-
-if HAVE_WINDOWS
-lib_embryo_libembryo_la_LIBADD += lib/evil/libevil.la
-endif
-
-lib_embryo_libembryo_la_LIBADD += -lm
+lib_embryo_libembryo_la_LIBADD = lib/eina/libeina.la @USE_EVIL_LIBS@ -lm
lib_embryo_libembryo_la_LDFLAGS = -no-undefined -version-info @version_info@ @release_info@
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/embryo\" \
-@EFL_CFLAGS@
-
-if HAVE_WINDOWS
-bin_embryo_embryo_cc_CPPFLAGS += \
--I$(top_srcdir)/src/lib/evil
-endif
+@EFL_CFLAGS@ \
+@USE_EVIL_CFLAGS@
bin_embryo_embryo_cc_LDADD = \
lib/embryo/libembryo.la \
-lib/eina/libeina.la
-
-if HAVE_WINDOWS
-bin_embryo_embryo_cc_LDADD += lib/evil/libevil.la
-endif
-
-bin_embryo_embryo_cc_LDADD += -lm
+lib/eina/libeina.la \
+@USE_EVIL_LIBS@ \
+-lm
EXTRA_DIST += \
bin/embryo/embryo_cc_sc5.scp \
-DEFL_EO_BUILD \
@EFL_CFLAGS@ \
@EFL_COV_CFLAGS@ \
-@EO_CFLAGS@
-
-if HAVE_WINDOWS
-lib_eo_libeo_la_CPPFLAGS += \
--I$(top_srcdir)/src/lib/evil
-endif
+@EO_CFLAGS@ \
+@USE_EVIL_CFLAGS@
lib_eo_libeo_la_LIBADD = lib/eina/libeina.la @EO_LIBS@ @EFL_COV_LIBS@
@EFL_CFLAGS@ \
@EFL_COV_CFLAGS@ \
@EVAS_CFLAGS@ \
-@ALTIVEC_CFLAGS@
+@ALTIVEC_CFLAGS@ \
+@USE_EVIL_CFLAGS@
# SSE3
noinst_LTLIBRARIES += lib/evas/common/libevas_op_blend_sse3.la
lib_evas_common_libevas_op_blend_sse3_la_LIBADD = @EFL_COV_LIBS@
-if HAVE_WINDOWS
-lib_evas_libevas_la_CPPFLAGS += \
--I$(top_srcdir)/src/lib/evil
-endif
-
lib_evas_libevas_la_CXXFLAGS =
lib_evas_libevas_la_LIBADD = \
-I$(top_srcdir)/src/lib/evas/cserve2 \
-DEFL_EVAS_BUILD \
@EFL_CFLAGS@ \
-@EVAS_CFLAGS@
-if HAVE_WINDOWS
-modules_evas_engines_buffer_module_la_CPPFLAGS += \
--I$(top_srcdir)/src/lib/evil
-endif
+@EVAS_CFLAGS@ \
+@USE_EVIL_CFLAGS@
modules_evas_engines_buffer_module_la_LIBADD = lib/evas/libevas.la @EFL_LIBS@
modules_evas_engines_buffer_module_la_LDFLAGS = -no-undefined -module -avoid-version
modules_evas_engines_buffer_module_la_LIBTOOLFLAGS = --tag=disable-static
-DEFL_EVAS_BUILD \
@evas_engine_software_ddraw_cflags@ \
@EFL_CFLAGS@ \
-@EVAS_CFLAGS@
-if HAVE_WINDOWS
-modules_evas_engines_software_ddraw_module_la_CPPFLAGS += \
--I$(top_srcdir)/src/lib/evil
-endif
+@EVAS_CFLAGS@ \
+@USE_EVIL_CFLAGS@
modules_evas_engines_software_ddraw_module_la_CXXFLAGS = -fno-rtti -fno-exceptions
modules_evas_engines_software_ddraw_module_la_LIBADD = \
lib/evas/libevas.la \
-DEFL_EVAS_BUILD \
@evas_engine_software_gdi_cflags@ \
@EFL_CFLAGS@ \
-@EVAS_CFLAGS@
-if HAVE_WINDOWS
-modules_evas_engines_software_gdi_module_la_CPPFLAGS += \
--I$(top_srcdir)/src/lib/evil
-endif
+@EVAS_CFLAGS@ \
+@USE_EVIL_CFLAGS@
modules_evas_engines_software_gdi_module_la_LIBADD = \
lib/evas/libevas.la \
@evas_engine_software_gdi_libs@ \
-DEFL_EVAS_BUILD \
@evas_image_loader_tiff_cflags@ \
@EFL_CFLAGS@ \
-@EVAS_CFLAGS@
-if HAVE_WINDOWS
-modules_evas_loaders_tiff_module_la_CPPFLAGS += \
--I$(top_srcdir)/src/lib/evil
-endif
+@EVAS_CFLAGS@ \
+@USE_EVIL_CFLAGS@
modules_evas_loaders_tiff_module_la_LIBADD = \
lib/evas/libevas.la \
@EFL_LIBS@ \
-DEFL_EVAS_BUILD \
@evas_image_loader_tiff_cflags@ \
@EFL_CFLAGS@ \
-@EVAS_CFLAGS@
-if HAVE_WINDOWS
-modules_evas_savers_tiff_module_la_CPPFLAGS += \
--I$(top_srcdir)/src/lib/evil
-endif
+@EVAS_CFLAGS@ \
+@USE_EVIL_CFLAGS@
modules_evas_savers_tiff_module_la_LIBADD = \
lib/evas/libevas.la \
@EFL_LIBS@ \
@EFL_CFLAGS@ \
@EVIL_CPPFLAGS@
-if HAVE_WINDOWS
-bin_evil_evil_suite_CPPFLAGS += \
--I$(top_srcdir)/src/lib/evil
-endif
-
bin_evil_evil_suite_LDADD = \
lib/evil/libevil.la \
lib/evil/libdl.la \