Add Makefile.am for main and luc-handler directories
authorFrancisco Marchena <francisco.marchena@codethink.co.uk>
Wed, 6 Jun 2012 16:03:17 +0000 (17:03 +0100)
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>
Mon, 11 Jun 2012 10:59:41 +0000 (11:59 +0100)
.gitignore
Makefile.am [new file with mode: 0644]
luc-handler/Makefile.am [new file with mode: 0644]

index a37a979..75124d5 100644 (file)
@@ -1,3 +1 @@
-# OS generated files#
-#####################
 *~ 
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..2a12980
--- /dev/null
@@ -0,0 +1,16 @@
+# vi:set ts=8 sw=8 noet ai nocindent:
+
+SUBDIRS =                                                              \
+       luc-handler
+
+.PHONY: ChangeLog
+
+ChangeLog: Makefile
+       (GIT_DIR=$(top_srcdir)/.git git log > .changelog.tmp \
+       && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) \
+       || (touch ChangeLog; echo 'Git directory not found: installing possibly empty changelog.' >&2)
+
+dist-hook: ChangeLog
+
+DISTCHECK_CONFIGURE_FLAGS =                                            \
+       --enable-gtk-doc
diff --git a/luc-handler/Makefile.am b/luc-handler/Makefile.am
new file mode 100644 (file)
index 0000000..fda5c02
--- /dev/null
@@ -0,0 +1,64 @@
+# vi:set ts=8 sw=8 noet ai nocindent:
+
+luc_handlerdir =                                                       \
+       $(libdir)/luc-handler-$(BOOT_MANAGER_VERSION_API)
+
+luc_handler_PROGRAMS =                                                 \
+       luc-handler
+
+luc_handler_built_sources =                                            \
+       luc-handler-dbus.c                                              \
+       luc-handler-dbus.h
+
+luc_handler_SOURCES =                                                  \
+       main.c                                                          \
+       $(luc_handler_built_sources)
+
+luc_handler_CFLAGS =                                                   \
+       -DG_LOG_DOMAIN=\"luc-handler\"                                  \
+       -I$(top_srcdir)                                                 \
+       $(GIO_CFLAGS)                                                   \
+       $(GLIB_CFLAGS)                                                  \
+       $(PLATFORM_CFLAGS)                                              \
+       $(PLATFORM_CPPFLAGS)                                            \
+       $(SYSTEMD_DAEMON_CFLAGS)
+
+luc_handler_LDFLAGS =                                                  \
+       -no-undefined                                                   \
+       $(PLATFORM_LDFLAGS)
+
+luc_handler_LDADD =                                                    \
+       $(GIO_LIBS)                                                     \
+       $(GLIB_LIBS)                                                    \
+       $(SYSTEMD_DAEMON_LIBS)
+
+servicedir = $(datadir)/dbus-1/services
+service_in_files =                                                     \
+       org.genivi.LUCHandler1.service.in
+
+service_DATA = $(service_in_files:.service.in=.service)
+
+%.service: %.service.in
+       sed -e "s,\@libdir\@,$(libdir),g"                               \
+           -e "s,\@BOOT_MANAGER_VERSION_API\@,$(BOOT_MANAGER_VERSION_API),g" < $< > $@
+
+CLEANFILES =                                                           \
+       $(service_DATA)
+
+EXTRA_DIST =                                                           \
+       $(service_in_files)                                             \
+       luc-handler-dbus.xml
+
+DISTCLEANFILES =                                                       \
+       $(luc_handler_built_sources)
+
+BUILT_SOURCES =                                                                \
+       $(luc_handler_built_sources)
+
+luc-handler-dbus.h: luc-handler-dbus.xml Makefile
+       $(AM_V_GEN) $(GDBUS_CODEGEN)                                    \
+           --interface-prefix org.genivi.LUCHandler1                   \
+           --c-namespace ""                                            \
+           --generate-c-code luc-handler-dbus                          \
+           --annotate org.genivi.LUCHandler1 org.gtk.GDBus.C.Name      \
+             "LUCHandler" $<