efl: simplify linkage/usage of evil on windows.
authorGustavo Sverzut Barbieri <barbieri@gmail.com>
Thu, 20 Dec 2012 19:25:51 +0000 (19:25 +0000)
committerGustavo Sverzut Barbieri <barbieri@gmail.com>
Thu, 20 Dec 2012 19:25:51 +0000 (19:25 +0000)
instead of spreading it all around, just define 2 AC_SUBST() that will
do the work.

SVN revision: 81477

configure.ac
src/Makefile_Ecore.am
src/Makefile_Ecore_Con.am
src/Makefile_Ecore_Evas.am
src/Makefile_Eet.am
src/Makefile_Eina.am
src/Makefile_Embryo.am
src/Makefile_Eo.am
src/Makefile_Evas.am
src/Makefile_Evil.am

index ef070c0..914779e 100644 (file)
@@ -677,9 +677,14 @@ AC_DEFINE_IF([HAVE_ATFILE_SOURCE],
 
 ######################  EFL  ######################
 
+#### Platform-dependent
+DL_LIBS=""
 
 #### Evil
 
+USE_EVIL_CFLAGS=""
+USE_EVIL_LIBS=""
+
 if test "x${have_windows}" = "xyes" ; then
 
 AC_MSG_NOTICE([Evil checks])
@@ -747,8 +752,14 @@ else
 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
 
 
@@ -789,6 +800,9 @@ fi
 
 #### End of Escape
 
+AC_SUBST([DL_LIBS])
+#### End of Platform-dependent
+
 
 #### Eina
 
index 2efb6ed..cffe35f 100644 (file)
@@ -55,12 +55,8 @@ lib_ecore_libecore_la_CPPFLAGS = \
 -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 += \
@@ -69,11 +65,8 @@ endif
 
 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
index 5ef183c..df18c90 100644 (file)
@@ -43,22 +43,15 @@ lib_ecore_con_libecore_con_la_CPPFLAGS = \
 -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
 
index 79faae6..0e0aabb 100644 (file)
@@ -30,12 +30,8 @@ lib_ecore_evas_libecore_evas_la_CPPFLAGS = \
 -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 \
index 4377c87..7c7e8be 100644 (file)
@@ -33,20 +33,15 @@ lib_eet_libeet_la_CPPFLAGS = \
 -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@
 
@@ -67,22 +62,15 @@ bin_eet_eet_CPPFLAGS = \
 -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
 
index b7acbe9..931876e 100644 (file)
@@ -212,22 +212,10 @@ lib_eina_libeina_la_CPPFLAGS = \
 @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@
 
index 7d8e9ec..66acb32 100644 (file)
@@ -23,20 +23,10 @@ lib_embryo_libembryo_la_CPPFLAGS = \
 -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@
 
@@ -67,22 +57,14 @@ bin_embryo_embryo_cc_CPPFLAGS = \
 -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 \
index 0d1bb77..54fef7e 100644 (file)
@@ -19,12 +19,8 @@ lib_eo_libeo_la_CPPFLAGS = \
 -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@
 
index fbddad2..a07fabb 100644 (file)
@@ -207,7 +207,8 @@ lib_evas_libevas_la_CPPFLAGS = \
 @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
@@ -222,11 +223,6 @@ $(lib_evas_libevas_la_CPPFLAGS) \
 
 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 = \
@@ -409,11 +405,8 @@ modules_evas_engines_buffer_module_la_CPPFLAGS = \
 -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
@@ -763,11 +756,8 @@ modules_evas_engines_software_ddraw_module_la_CPPFLAGS = \
 -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 \
@@ -804,11 +794,8 @@ modules_evas_engines_software_gdi_module_la_CPPFLAGS = \
 -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@ \
@@ -1325,11 +1312,8 @@ modules_evas_loaders_tiff_module_la_CPPFLAGS = \
 -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@ \
@@ -1349,11 +1333,8 @@ modules_evas_savers_tiff_module_la_CPPFLAGS = \
 -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@ \
index bd4e53c..a9c4d54 100644 (file)
@@ -161,11 +161,6 @@ bin_evil_evil_suite_CPPFLAGS = \
 @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 \