aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-06-16 23:32:29 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-06-16 23:32:29 -0500
commit1ad51b4ec12a5dc7a270069b27a7bcd8d60da2f0 (patch)
tree97f760066dcf450497558805aa79699f71d857c3
parentb8f5e0707f454ff8d9e87c65aa058847f587be34 (diff)
downloadayatana-indicator-power-1ad51b4ec12a5dc7a270069b27a7bcd8d60da2f0.tar.gz
ayatana-indicator-power-1ad51b4ec12a5dc7a270069b27a7bcd8d60da2f0.tar.bz2
ayatana-indicator-power-1ad51b4ec12a5dc7a270069b27a7bcd8d60da2f0.zip
update indicator-power build rules to reflect the changes in source code and in dependencies
-rw-r--r--src/Makefile.am122
1 files changed, 88 insertions, 34 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index b2cf3df..2aff220 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,36 +1,90 @@
+BUILT_SOURCES =
+EXTRA_DIST =
CLEANFILES =
-ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
-
-###################
-# Indicator Stuff
-###################
-
-powerlibdir = $(INDICATORDIR)
-powerlib_LTLIBRARIES = libpower.la
-
-libpower_la_SOURCES = \
- dbus-listener.c \
- dbus-listener.h \
- device.c \
- device.h \
- indicator-power.h \
- indicator-power.c
-
-CLEANFILES += .libs/*.gcda .libs/*.gcno *.gcda *.gcno
-
-libpower_la_CFLAGS = \
- $(UPOWER_CFLAGS) \
- $(INDICATOR_CFLAGS) \
- $(COVERAGE_CFLAGS) \
- -Wall -Werror \
- -DG_LOG_DOMAIN=\"Indicator-Power\"
-
-libpower_la_LIBADD = \
- $(UPOWER_LIBS) \
- $(INDICATOR_LIBS)
-
-libpower_la_LDFLAGS = \
- $(COVERAGE_LDFLAGS) \
- -module \
- -avoid-version
+
+SHARED_CFLAGS = \
+ -Wall -Werror \
+ $(SERVICE_DEPS_CFLAGS) \
+ -DG_LOG_DOMAIN=\"Indicator-Power\"
+
+###
+###
+
+upower_dbus_sources = \
+ dbus-upower.c \
+ dbus-upower.h
+
+$(upower_dbus_sources): org.freedesktop.UPower.xml
+ $(AM_V_GEN) gdbus-codegen \
+ --c-namespace Dbus \
+ --interface-prefix org.freedesktop \
+ --generate-c-code dbus-upower \
+ $^
+
+BUILT_SOURCES += $(upower_dbus_sources)
+CLEANFILES += $(upower_dbus_sources)
+EXTRA_DIST += org.freedesktop.UPower.xml
+
+###
+###
+
+upower_device_dbus_sources = \
+ dbus-upower-device.c \
+ dbus-upower-device.h
+
+$(upower_device_dbus_sources): org.freedesktop.UPower.Device.xml
+ $(AM_V_GEN) gdbus-codegen \
+ --c-namespace Dbus \
+ --interface-prefix org.freedesktop.UPower \
+ --generate-c-code dbus-upower-device \
+ $^
+
+BUILT_SOURCES += $(upower_device_dbus_sources)
+CLEANFILES += $(upower_device_dbus_sources)
+EXTRA_DIST += org.freedesktop.UPower.Device.xml
+
+###
+###
+###
+
+noinst_LIBRARIES = libindicatorpower-upower.a libindicatorpower-service.a
+
+libindicatorpower_upower_a_SOURCES = \
+ $(upower_dbus_sources) \
+ $(upower_device_dbus_sources) \
+ device-provider-upower.c \
+ device-provider-upower.h
+
+libindicatorpower_upower_a_CFLAGS = $(SHARED_CFLAGS) -Wextra -Wno-unused-parameter
+
+libindicatorpower_service_a_SOURCES = \
+ device-provider.c \
+ device-provider.h \
+ device.c \
+ device.h \
+ service.c \
+ service.h
+
+libindicatorpower_service_a_CFLAGS = $(SHARED_CFLAGS)
+
+###
+###
+###
+
+libexec_PROGRAMS = indicator-power-service
+
+indicator_power_service_SOURCES = main.c
+
+indicator_power_service_CFLAGS = \
+ $(SHARED_CFLAGS) \
+ -Wextra -Wno-missing-field-initializers
+
+indicator_power_service_LDADD = \
+ libindicatorpower-upower.a \
+ libindicatorpower-service.a \
+ $(SERVICE_DEPS_LIBS)
+
+indicator_power_service_LDFLAGS = \
+ $(COVERAGE_LDFLAGS)
+