summaryrefslogtreecommitdiff
path: root/src/Makefile_Eina.am
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-14 22:36:23 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-14 22:36:23 +0000
commitb1bc5aeb24d6dd0faf97c2d1d6c6781798a7fbe9 (patch)
treeebffce52ddbab71c6da6c2e07eeca7382abf15f6 /src/Makefile_Eina.am
parent283805237a9f5f194568667fc32586a3238cbde0 (diff)
efl: simplify automake.
Instead of -I$(top_srcdir)... -I$(top_builddir)... and then do it for the .la, use the EFL_ macros to generate the contents to be used in automake files. There is a nasty bit that libtool will parse Makefile*.am and will not get _DEPENDENCIES from _LIBADD and _LDADD if these are in @REPLACEMENT@. To solve this we must explicitly set _DEPENDENCIES. The contents of this is almost the same as _LIBADD or _LDADD with the "_INTERNAL_" replacement name. I hope the code will be result will be shorter and consistent as there is less places to change when we add/remove dependencies. Statistics are quite impressive (diffstat): {{{ 37 files changed, 663 insertions(+), 1599 deletions(-) }}} SVN revision: 82785
Diffstat (limited to 'src/Makefile_Eina.am')
-rw-r--r--src/Makefile_Eina.am74
1 files changed, 19 insertions, 55 deletions
diff --git a/src/Makefile_Eina.am b/src/Makefile_Eina.am
index 51c32cb..80af55f 100644
--- a/src/Makefile_Eina.am
+++ b/src/Makefile_Eina.am
@@ -154,28 +154,19 @@ else
154lib_eina_libeina_la_SOURCES += lib/eina/eina_file.c 154lib_eina_libeina_la_SOURCES += lib/eina/eina_file.c
155endif 155endif
156 156
157EINA_MODULE_COMMON_CPPFLAGS = \
158-I$(top_srcdir)/src/lib/eina \
159-I$(top_builddir)/src/lib/eina \
160-DEFL_EINA_BUILD
161
162EINA_MODULE_COMMON_CFLAGS = \ 157EINA_MODULE_COMMON_CFLAGS = \
163@EINA_CFLAGS@ \ 158@EINA_CFLAGS@ \
164@VALGRIND_CFLAGS@ 159@VALGRIND_CFLAGS@
165 160
166EINA_MODULE_COMMON_LIBADD = \
167lib/eina/libeina.la \
168@EINA_LIBS@
169
170if EINA_STATIC_BUILD_CHAINED_POOL 161if EINA_STATIC_BUILD_CHAINED_POOL
171lib_eina_libeina_la_SOURCES += modules/eina/mp/chained_pool/eina_chained_mempool.c 162lib_eina_libeina_la_SOURCES += modules/eina/mp/chained_pool/eina_chained_mempool.c
172else 163else
173einampchainedpooldir = $(libdir)/eina/modules/mp/chained_pool/$(MODULE_ARCH) 164einampchainedpooldir = $(libdir)/eina/modules/mp/chained_pool/$(MODULE_ARCH)
174einampchainedpool_LTLIBRARIES = modules/eina/mp/chained_pool/chained_pool_module.la 165einampchainedpool_LTLIBRARIES = modules/eina/mp/chained_pool/chained_pool_module.la
175 166
176modules_eina_mp_chained_pool_chained_pool_module_la_CPPFLAGS = $(EINA_MODULE_COMMON_CPPFLAGS)
177modules_eina_mp_chained_pool_chained_pool_module_la_CFLAGS = $(EINA_MODULE_COMMON_CFLAGS) 167modules_eina_mp_chained_pool_chained_pool_module_la_CFLAGS = $(EINA_MODULE_COMMON_CFLAGS)
178modules_eina_mp_chained_pool_chained_pool_module_la_LIBADD = $(EINA_MODULE_COMMON_LIBADD) 168modules_eina_mp_chained_pool_chained_pool_module_la_LIBADD = @USE_EINA_LIBS@
169modules_eina_mp_chained_pool_chained_pool_module_la_DEPENDENCIES = @USE_EINA_INTERNAL_LIBS@
179modules_eina_mp_chained_pool_chained_pool_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@ 170modules_eina_mp_chained_pool_chained_pool_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
180modules_eina_mp_chained_pool_chained_pool_module_la_LIBTOOLFLAGS = --tag=disable-static 171modules_eina_mp_chained_pool_chained_pool_module_la_LIBTOOLFLAGS = --tag=disable-static
181modules_eina_mp_chained_pool_chained_pool_module_la_SOURCES = modules/eina/mp/chained_pool/eina_chained_mempool.c 172modules_eina_mp_chained_pool_chained_pool_module_la_SOURCES = modules/eina/mp/chained_pool/eina_chained_mempool.c
@@ -187,9 +178,9 @@ else
187einamponebigdir = $(libdir)/eina/modules/mp/one_big/$(MODULE_ARCH) 178einamponebigdir = $(libdir)/eina/modules/mp/one_big/$(MODULE_ARCH)
188einamponebig_LTLIBRARIES = modules/eina/mp/one_big/one_big_module.la 179einamponebig_LTLIBRARIES = modules/eina/mp/one_big/one_big_module.la
189 180
190modules_eina_mp_one_big_one_big_module_la_CPPFLAGS = $(EINA_MODULE_COMMON_CPPFLAGS)
191modules_eina_mp_one_big_one_big_module_la_CFLAGS = $(EINA_MODULE_COMMON_CFLAGS) 181modules_eina_mp_one_big_one_big_module_la_CFLAGS = $(EINA_MODULE_COMMON_CFLAGS)
192modules_eina_mp_one_big_one_big_module_la_LIBADD = $(EINA_MODULE_COMMON_LIBADD) 182modules_eina_mp_one_big_one_big_module_la_LIBADD = @USE_EINA_LIBS@
183modules_eina_mp_one_big_one_big_module_la_DEPENDENCIES = @USE_EINA_INTERNAL_LIBS@
193modules_eina_mp_one_big_one_big_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@ 184modules_eina_mp_one_big_one_big_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
194modules_eina_mp_one_big_one_big_module_la_LIBTOOLFLAGS = --tag=disable-static 185modules_eina_mp_one_big_one_big_module_la_LIBTOOLFLAGS = --tag=disable-static
195modules_eina_mp_one_big_one_big_module_la_SOURCES = modules/eina/mp/one_big/eina_one_big.c 186modules_eina_mp_one_big_one_big_module_la_SOURCES = modules/eina/mp/one_big/eina_one_big.c
@@ -201,31 +192,23 @@ else
201einamppassthroughdir = $(libdir)/eina/modules/mp/pass_through/$(MODULE_ARCH) 192einamppassthroughdir = $(libdir)/eina/modules/mp/pass_through/$(MODULE_ARCH)
202einamppassthrough_LTLIBRARIES = modules/eina/mp/pass_through/pass_through_module.la 193einamppassthrough_LTLIBRARIES = modules/eina/mp/pass_through/pass_through_module.la
203 194
204modules_eina_mp_pass_through_pass_through_module_la_CPPFLAGS = $(EINA_MODULE_COMMON_CPPFLAGS)
205modules_eina_mp_pass_through_pass_through_module_la_CFLAGS = $(EINA_MODULE_COMMON_CFLAGS) 195modules_eina_mp_pass_through_pass_through_module_la_CFLAGS = $(EINA_MODULE_COMMON_CFLAGS)
206modules_eina_mp_pass_through_pass_through_module_la_LIBADD = $(EINA_MODULE_COMMON_LIBADD) 196modules_eina_mp_pass_through_pass_through_module_la_LIBADD = @USE_EINA_LIBS@
197modules_eina_mp_pass_through_pass_through_module_la_DEPENDENCIES = @USE_EINA_INTERNAL_LIBS@
207modules_eina_mp_pass_through_pass_through_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@ 198modules_eina_mp_pass_through_pass_through_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
208modules_eina_mp_pass_through_pass_through_module_la_LIBTOOLFLAGS = --tag=disable-static 199modules_eina_mp_pass_through_pass_through_module_la_LIBTOOLFLAGS = --tag=disable-static
209modules_eina_mp_pass_through_pass_through_module_la_SOURCES = modules/eina/mp/pass_through/eina_pass_through.c 200modules_eina_mp_pass_through_pass_through_module_la_SOURCES = modules/eina/mp/pass_through/eina_pass_through.c
210endif 201endif
211 202
212lib_eina_libeina_la_CPPFLAGS = \ 203lib_eina_libeina_la_CPPFLAGS = \
213-I$(top_srcdir)/src/lib/eina \ 204@EINA_CFLAGS@ \
214-I$(top_builddir)/src/lib/eina \
215-DPACKAGE_BIN_DIR=\"$(bindir)\" \ 205-DPACKAGE_BIN_DIR=\"$(bindir)\" \
216-DPACKAGE_LIB_DIR=\"$(libdir)\" \ 206-DPACKAGE_LIB_DIR=\"$(libdir)\" \
217-DPACKAGE_DATA_DIR=\"$(datadir)/eina\" \ 207-DPACKAGE_DATA_DIR=\"$(datadir)/eina\" \
218-DEFL_EINA_BUILD \ 208@VALGRIND_CFLAGS@
219@EFL_COV_CFLAGS@ \ 209
220@EINA_CFLAGS@ \ 210lib_eina_libeina_la_LIBADD = @EINA_LIBS@ @DL_LIBS@
221@VALGRIND_CFLAGS@ \ 211lib_eina_libeina_la_DEPENDENCIES = @EINA_INTERNAL_LIBS@ @DL_INTERNAL_LIBS@
222@USE_EVIL_CFLAGS@
223
224lib_eina_libeina_la_LIBADD = \
225@EINA_LIBS@ \
226@EFL_COV_LIBS@ \
227@USE_EVIL_LIBS@ \
228@DL_LIBS@
229lib_eina_libeina_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@ 212lib_eina_libeina_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
230 213
231### Script 214### Script
@@ -281,28 +264,16 @@ tests/eina/eina_test_barrier.c
281# tests/eina/eina_test_model.c 264# tests/eina/eina_test_model.c
282 265
283tests_eina_eina_suite_CPPFLAGS = \ 266tests_eina_eina_suite_CPPFLAGS = \
284-I$(top_srcdir)/src/lib/eina \
285-I$(top_builddir)/src/lib/eina \
286-DPACKAGE_BUILD_DIR=\"`pwd`/$(top_builddir)/tests/eina\" \ 267-DPACKAGE_BUILD_DIR=\"`pwd`/$(top_builddir)/tests/eina\" \
287@CHECK_CFLAGS@ \ 268@CHECK_CFLAGS@ \
288@EINA_CFLAGS@ 269@EINA_CFLAGS@
289 270tests_eina_eina_suite_LDADD = @CHECK_LIBS@ @USE_EINA_LIBS@
290tests_eina_eina_suite_LDADD = \ 271tests_eina_eina_suite_DEPENDENCIES = @USE_EINA_INTERNAL_LIBS@
291lib/eina/libeina.la \
292@CHECK_LIBS@ \
293@EINA_LDFLAGS@
294 272
295tests_eina_cxx_compile_test_SOURCES = tests/eina/cxx_compile_test.cxx 273tests_eina_cxx_compile_test_SOURCES = tests/eina/cxx_compile_test.cxx
296 274tests_eina_cxx_compile_test_CPPFLAGS = @EINA_CFLAGS@
297tests_eina_cxx_compile_test_CPPFLAGS = \ 275tests_eina_cxx_compile_test_LDADD = @USE_EINA_LIBS@
298-I$(top_srcdir)/src/lib/eina \ 276tests_eina_cxx_compile_test_DEPENDENCIES = @USE_EINA_INTERNAL_LIBS@
299-I$(top_builddir)/src/lib/eina \
300@CHECK_CFLAGS@ \
301@EINA_CFLAGS@
302
303tests_eina_cxx_compile_test_LDADD = \
304lib/eina/libeina.la \
305@EINA_LDFLAGS@
306 277
307EXTRA_LTLIBRARIES = tests/eina/module_dummy.la 278EXTRA_LTLIBRARIES = tests/eina/module_dummy.la
308 279
@@ -311,19 +282,12 @@ check-local: tests/eina/module_dummy.la
311tests_eina_module_dummy_la_SOURCES = tests/eina/eina_test_module_dummy.c 282tests_eina_module_dummy_la_SOURCES = tests/eina/eina_test_module_dummy.c
312 283
313tests_eina_module_dummy_la_CPPFLAGS = \ 284tests_eina_module_dummy_la_CPPFLAGS = \
314-I$(top_srcdir)/src/lib/eina \
315-I$(top_builddir)/src/lib/eina \
316-DPACKAGE_BUILD_DIR=\"`pwd`/$(top_builddir)/tests/eina\" \ 285-DPACKAGE_BUILD_DIR=\"`pwd`/$(top_builddir)/tests/eina\" \
317@CHECK_CFLAGS@ \ 286@CHECK_CFLAGS@ \
318@EINA_CFLAGS@ \ 287@EINA_CFLAGS@
319-DEFL_EINA_BUILD 288tests_eina_module_dummy_la_LIBADD = @USE_EINA_LIBS@
320 289tests_eina_module_dummy_la_DEPENDENCIES = @USE_EINA_INTERNAL_LIBS@
321tests_eina_module_dummy_la_LIBADD = \
322lib/eina/libeina.la \
323@EINA_LIBS@
324
325tests_eina_module_dummy_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@ 290tests_eina_module_dummy_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
326
327tests_eina_module_dummy_la_LIBTOOLFLAGS = --tag=disable-static 291tests_eina_module_dummy_la_LIBTOOLFLAGS = --tag=disable-static
328 292
329endif 293endif