[libepc] Build: examples: Avoiding some repetition.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libepc] Build: examples: Avoiding some repetition.
- Date: Wed, 12 Oct 2011 16:24:27 +0000 (UTC)
commit 9f430251d0a602d94969261dcdc3e26f674f583d
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Oct 12 18:24:21 2011 +0200
Build: examples: Avoiding some repetition.
* Makefile.am: Used variables to avoid copy/pasting.
ChangeLog | 6 +++
Makefile.am | 109 ++++++++++++++++++++++++++++++++---------------------------
2 files changed, 65 insertions(+), 50 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e822985..82cec3d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2011-10-12 Murray Cumming <murrayc murrayc com>
+ Build: examples: Avoiding some repetition.
+
+ * Makefile.am: Used variables to avoid copy/pasting.
+
+2011-10-12 Murray Cumming <murrayc murrayc com>
+
examples: Fix linker problems.
* Makefile.am: Some examples used GTK+ but didn't link to it.
diff --git a/Makefile.am b/Makefile.am
index e0fba2a..7475a14 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -134,6 +134,11 @@ AM_CFLAGS = \
-DLOCALEDIR=\"$(localedir)\" \
-DGETTEXT_PACKAGE=\"@GETTEXT_PACKAGE \"
+example_epc_cflags = $(AM_CFLAGS) $(LIBEPC_CFLAGS)
+example_epc_libs = libepc/libepc-1.0.la $(LIBEPC_LIBS)
+example_epc_ui_cflags = $(example_epc_cflags) $(LIBEPC_UI_CFLAGS)
+example_epc_ui_libs = $(example_epc_libs) libepc-ui/libepc-ui-1.0.la $(LIBEPC_UI_LIBS)
+
libepc_libepc_1_0_la_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS) -DG_LOG_DOMAIN=\"libepc\"
libepc_libepc_1_0_la_LDFLAGS = $(LIBEPC_LIBS) -version-info $(LT_VERSION_INFO)
@@ -141,56 +146,60 @@ libepc_ui_libepc_ui_1_0_la_CFLAGS = $(AM_CFLAGS) $(LIBEPC_UI_CFLAGS) -DG_LOG_DO
libepc_ui_libepc_ui_1_0_la_LDFLAGS = $(LIBEPC_UI_LIBS) -version-info $(LT_VERSION_INFO)
libepc_ui_libepc_ui_1_0_la_LIBADD = libepc/libepc-1.0.la
-examples_list_resources_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS)
-examples_list_resources_LDADD = libepc/libepc-1.0.la $(LIBEPC_LIBS)
-examples_lookup_resource_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS)
-examples_lookup_resource_LDADD = libepc/libepc-1.0.la $(LIBEPC_LIBS)
-examples_service_browser_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS)
-examples_service_browser_LDADD = libepc/libepc-1.0.la $(LIBEPC_LIBS)
-examples_simple_publisher_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS)
-examples_simple_publisher_LDADD = libepc/libepc-1.0.la $(LIBEPC_LIBS)
+examples_list_resources_CFLAGS = $(example_epc_cflags)
+examples_list_resources_LDADD = $(example_epc_libs)
+examples_lookup_resource_CFLAGS = $(example_epc_cflags)
+examples_lookup_resource_LDADD = $(example_epc_libs)
+examples_service_browser_CFLAGS = $(example_epc_cflags)
+examples_service_browser_LDADD = $(example_epc_libs)
+examples_simple_publisher_CFLAGS = $(example_epc_cflags)
+examples_simple_publisher_LDADD = $(example_epc_libs)
+
+examples_consumer_ui_CFLAGS = $(example_epc_ui_cflags) $(AVAHI_UI_CFLAGS)
+examples_consumer_ui_LDADD = $(example_epc_ui_libs) $(AVAHI_UI_LIBS)
+examples_publisher_ui_CFLAGS = $(example_epc_ui_cflags) $(AVAHI_UI_CFLAGS) -rdynamic
+examples_publisher_ui_LDADD = $(example_epc_ui_libs) $(AVAHI_UI_LIBS)
+examples_server_credentials_CFLAGS = $(example_epc_ui_cflags)
+examples_server_credentials_LDADD = $(example_epc_ui_libs)
+
-examples_consumer_ui_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS) $(LIBEPC_UI_CFLAGS) $(AVAHI_UI_CFLAGS)
-examples_consumer_ui_LDADD = libepc/libepc-1.0.la libepc-ui/libepc-ui-1.0.la $(AVAHI_UI_LIBS) $(LIBEPC_LIBS) $(LIBEPC_UI_LIBS)
-examples_publisher_ui_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS) $(LIBEPC_UI_CFLAGS) $(AVAHI_UI_CFLAGS) -rdynamic
-examples_publisher_ui_LDADD = libepc/libepc-1.0.la libepc-ui/libepc-ui-1.0.la $(AVAHI_UI_LIBS) $(LIBEPC_LIBS) $(LIBEPC_UI_LIBS)
-examples_server_credentials_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS) $(LIBEPC_UI_CFLAGS)
-examples_server_credentials_LDADD = libepc/libepc-1.0.la libepc-ui/libepc-ui-1.0.la $(LIBEPC_LIBS) $(LIBEPC_UI_LIBS)
+test_epc_libs = tests/libepc-tests.la $(example_epc_libs)
+test_epc_ui_libs = tests/libepc-tests.la $(example_epc_ui_libs)
-tests_libepc_tests_la_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS)
+tests_libepc_tests_la_CFLAGS = $(example_epc_cflags)
-tests_test_consumer_by_info_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS)
-tests_test_consumer_by_info_LDADD = libepc/libepc-1.0.la tests/libepc-tests.la $(LIBEPC_LIBS)
-tests_test_consumer_by_name_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS)
-tests_test_consumer_by_name_LDADD = libepc/libepc-1.0.la tests/libepc-tests.la $(LIBEPC_LIBS)
-tests_test_dispatcher_local_collision_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS)
-tests_test_dispatcher_local_collision_LDADD = libepc/libepc-1.0.la tests/libepc-tests.la $(LIBEPC_LIBS)
-tests_test_dispatcher_multiple_services_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS)
-tests_test_dispatcher_multiple_services_LDADD = libepc/libepc-1.0.la tests/libepc-tests.la $(LIBEPC_LIBS)
-tests_test_dispatcher_rename_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS)
-tests_test_dispatcher_rename_LDADD = libepc/libepc-1.0.la tests/libepc-tests.la $(LIBEPC_LIBS)
-tests_test_dispatcher_reset_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS)
-tests_test_dispatcher_reset_LDADD = libepc/libepc-1.0.la tests/libepc-tests.la $(LIBEPC_LIBS)
-tests_test_dispatcher_simple_service_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS)
-tests_test_dispatcher_simple_service_LDADD = libepc/libepc-1.0.la tests/libepc-tests.la $(LIBEPC_LIBS)
-tests_test_dispatcher_subtypes_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS)
-tests_test_dispatcher_subtypes_LDADD = libepc/libepc-1.0.la tests/libepc-tests.la $(LIBEPC_LIBS)
-tests_test_dispatcher_unique_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS)
-tests_test_dispatcher_unique_LDADD = libepc/libepc-1.0.la tests/libepc-tests.la $(LIBEPC_LIBS)
-tests_test_expand_name_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS)
-tests_test_expand_name_LDADD = libepc/libepc-1.0.la tests/libepc-tests.la $(LIBEPC_LIBS)
-tests_test_progress_hooks_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS) $(LIBEPC_UI_CFLAGS)
-tests_test_progress_hooks_LDADD = libepc/libepc-1.0.la libepc-ui/libepc-ui-1.0.la tests/libepc-tests.la $(LIBEPC_LIBS) $(LIBEPC_UI_LIBS)
-tests_test_publisher_bookmarks_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS)
-tests_test_publisher_bookmarks_LDADD = libepc/libepc-1.0.la tests/libepc-tests.la $(LIBEPC_LIBS)
-tests_test_publisher_change_name_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS)
-tests_test_publisher_change_name_LDADD = libepc/libepc-1.0.la tests/libepc-tests.la $(LIBEPC_LIBS)
-tests_test_publisher_libsoup_494128_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS)
-tests_test_publisher_libsoup_494128_LDADD = libepc/libepc-1.0.la tests/libepc-tests.la $(LIBEPC_LIBS)
-tests_test_publisher_unique_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS)
-tests_test_publisher_unique_LDADD = libepc/libepc-1.0.la tests/libepc-tests.la $(LIBEPC_LIBS)
-tests_test_service_type_CFLAGS = $(AM_CFLAGS) $(LIBEPC_CFLAGS)
-tests_test_service_type_LDADD = libepc/libepc-1.0.la tests/libepc-tests.la $(LIBEPC_LIBS)
+tests_test_consumer_by_info_CFLAGS = $(example_epc_cflags)
+tests_test_consumer_by_info_LDADD = $(test_epc_libs)
+tests_test_consumer_by_name_CFLAGS = $(example_epc_cflags)
+tests_test_consumer_by_name_LDADD = $(test_epc_libs)
+tests_test_dispatcher_local_collision_CFLAGS = $(example_epc_cflags)
+tests_test_dispatcher_local_collision_LDADD = $(test_epc_libs)
+tests_test_dispatcher_multiple_services_CFLAGS = $(example_epc_cflags)
+tests_test_dispatcher_multiple_services_LDADD = $(test_epc_libs)
+tests_test_dispatcher_rename_CFLAGS = $(example_epc_cflags)
+tests_test_dispatcher_rename_LDADD = $(test_epc_libs)
+tests_test_dispatcher_reset_CFLAGS = $(example_epc_cflags)
+tests_test_dispatcher_reset_LDADD = $(test_epc_libs)
+tests_test_dispatcher_simple_service_CFLAGS = $(example_epc_cflags)
+tests_test_dispatcher_simple_service_LDADD = $(test_epc_libs)
+tests_test_dispatcher_subtypes_CFLAGS = $(example_epc_cflags)
+tests_test_dispatcher_subtypes_LDADD = $(test_epc_libs)
+tests_test_dispatcher_unique_CFLAGS = $(example_epc_cflags)
+tests_test_dispatcher_unique_LDADD = $(test_epc_libs)
+tests_test_expand_name_CFLAGS = $(example_epc_cflags)
+tests_test_expand_name_LDADD = $(test_epc_libs)
+tests_test_progress_hooks_CFLAGS = $(example_epc_ui_cflags)
+tests_test_progress_hooks_LDADD = $(test_epc_ui_libs)
+tests_test_publisher_bookmarks_CFLAGS = $(example_epc_cflags)
+tests_test_publisher_bookmarks_LDADD = $(test_epc_libs)
+tests_test_publisher_change_name_CFLAGS = $(example_epc_cflags)
+tests_test_publisher_change_name_LDADD = $(test_epc_libs)
+tests_test_publisher_libsoup_494128_CFLAGS = $(example_epc_cflags)
+tests_test_publisher_libsoup_494128_LDADD = $(test_epc_libs)
+tests_test_publisher_unique_CFLAGS = $(example_epc_cflags)
+tests_test_publisher_unique_LDADD = $(test_epc_libs)
+tests_test_service_type_CFLAGS = $(example_epc_cflags)
+tests_test_service_type_LDADD = $(test_epc_libs)
# ==================
# -- CUSTOM RULES --
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]