Add convenience library 'libcommon.la'
authorJonathan Maw <jonathan.maw@codethink.co.uk>
Thu, 28 Jun 2012 08:54:01 +0000 (09:54 +0100)
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>
Fri, 29 Jun 2012 12:28:50 +0000 (13:28 +0100)
Reference to individual components of the 'common' directory in
components' respective makefiles are replaced with reference to the
convenience library 'libcommon.la'

Makefile.am
boot-manager/Makefile.am
common/Makefile.am [new file with mode: 0644]
configure.ac
legacy-app-handler/Makefile.am
luc-handler/Makefile.am

index 95c7abb..bf8f9dc 100644 (file)
@@ -1,6 +1,7 @@
 # vi:set ts=8 sw=8 noet ai nocindent:
 
 SUBDIRS =                                                              \
+       common                                                          \
        luc-handler                                                     \
        boot-manager                                                    \
        legacy-app-handler                                              \
index 4722350..a6f635b 100644 (file)
@@ -16,10 +16,8 @@ boot_manager_built_sources =                                         \
        $(boot_manager_built_headers)
 
 boot_manager_SOURCES =                                                 \
-       ../common/watchdog-client.c                                     \
-       ../common/watchdog-client.h                                     \
-       ../luc-handler/luc-handler-dbus.c                               \
-       ../luc-handler/luc-handler-dbus.h                               \
+       $(top_srcdir)/luc-handler/luc-handler-dbus.c                    \
+       $(top_srcdir)/luc-handler/luc-handler-dbus.h                    \
        boot-manager-application.c                                      \
        boot-manager-application.h                                      \
        boot-manager-service.c                                          \
@@ -46,12 +44,16 @@ boot_manager_LDFLAGS =                                                      \
        -no-undefined                                                   \
        $(PLATFORM_LDFLAGS)
 
+boot_manager_DEPENDENCIES =                                            \
+       $(top_builddir)/common/libcommon.la
+
 boot_manager_LDADD =                                                   \
        $(DLT_LIBS)                                                     \
        $(GIO_LIBS)                                                     \
        $(GIO_UNIX_LIBS)                                                \
        $(GLIB_LIBS)                                                    \
-       $(SYSTEMD_DAEMON_LIBS)
+       $(SYSTEMD_DAEMON_LIBS)                                          \
+       $(top_builddir)/common/libcommon.la
 
 servicedir = $(datadir)/dbus-1/services
 service_in_files =                                                     \
diff --git a/common/Makefile.am b/common/Makefile.am
new file mode 100644 (file)
index 0000000..4608d52
--- /dev/null
@@ -0,0 +1,30 @@
+# vi:set ts=8 sw=8 noet ai nocindent:
+
+noinst_LTLIBRARIES = libcommon.la
+
+libcommon_la_SOURCES =                                                 \
+       glib-extensions.c                                               \
+       glib-extensions.h                                               \
+       watchdog-client.c                                               \
+       watchdog-client.h
+
+libcommon_la_CFLAGS =                                                  \
+       -DG_LOG_DOMAIN=\"common\"                                       \
+       -I$(top_srcdir)                                                 \
+       $(GIO_CFLAGS)                                                   \
+       $(GIO_UNIX_CFLAGS)                                              \
+       $(GLIB_CFLAGS)                                                  \
+       $(PLATFORM_CFLAGS)                                              \
+       $(PLATFORM_CPPFLAGS)                                            \
+       $(SYSTEMD_DAEMON_CFLAGS)
+
+libcommon_la_LDFLAGS =                                                 \
+       -no-undefined                                                   \
+       $(PLATFORM_LDFLAGS)
+
+libcommon_la_LIBADD =                                                  \
+       $(GIO_LIBS)                                                     \
+       $(GIO_UNIX_LIBS)                                                \
+       $(GLIB_LIBS)                                                    \
+       $(SYSTEMD_DAEMON_LIBS)
+
index 6fe52b5..6469053 100644 (file)
@@ -135,6 +135,7 @@ AC_DEFINE_UNQUOTED([PRIORITISED_LUC_TYPES],
 
 AC_OUTPUT([
 Makefile
+common/Makefile
 boot-manager/Makefile
 legacy-app-handler/Makefile
 luc-handler/Makefile
index 5627476..38c1b75 100644 (file)
@@ -14,8 +14,6 @@ legacy_app_handler_built_sources =                                    \
        $(legacy_app_handler_built_headers)
 
 legacy_app_handler_SOURCES =                                           \
-       ../common/watchdog-client.c                                     \
-       ../common/watchdog-client.h                                     \
        la-handler-application.c                                        \
        la-handler-application.h                                        \
        la-handler-service.c                                            \
@@ -38,12 +36,16 @@ legacy_app_handler_LDFLAGS =                                                \
        -no-undefined                                                   \
        $(PLATFORM_LDFLAGS)
 
+legacy_app_handler_DEPENDENCIES =                                      \
+       $(top_builddir)/common/libcommon.la
+
 legacy_app_handler_LDADD =                                             \
        $(DLT_LIBS)                                                     \
        $(GIO_LIBS)                                                     \
        $(GIO_UNIX_LIBS)                                                \
        $(GLIB_LIBS)                                                    \
-       $(SYSTEMD_DAEMON_LIBS)
+       $(SYSTEMD_DAEMON_LIBS)                                          \
+       $(top_builddir)/common/libcommon.la
 
 servicedir = $(datadir)/dbus-1/services
 service_in_files =                                                     \
index bf1ddde..e86f4b1 100644 (file)
@@ -14,10 +14,6 @@ luc_handler_built_sources =                                          \
        $(luc_handler_built_headers)
 
 luc_handler_SOURCES =                                                  \
-       ../common/glib-extensions.c                                     \
-       ../common/glib-extensions.h                                     \
-       ../common/watchdog-client.c                                     \
-       ../common/watchdog-client.h                                     \
        luc-handler-application.c                                       \
        luc-handler-application.h                                       \
        luc-handler-service.c                                           \
@@ -40,12 +36,16 @@ luc_handler_LDFLAGS =                                                       \
        -no-undefined                                                   \
        $(PLATFORM_LDFLAGS)
 
+luc_handler_DEPENDENCIES =                                             \
+       $(top_builddir)/common/libcommon.la
+
 luc_handler_LDADD =                                                    \
        $(DLT_LIBS)                                                     \
        $(GIO_LIBS)                                                     \
        $(GIO_UNIX_LIBS)                                                \
        $(GLIB_LIBS)                                                    \
-       $(SYSTEMD_DAEMON_LIBS)
+       $(SYSTEMD_DAEMON_LIBS)                                          \
+       $(top_builddir)/common/libcommon.la
 
 servicedir = $(datadir)/dbus-1/services
 service_in_files =                                                     \