aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.am
blob: 24615922be118ca47644b2a810e3e91d89f4892b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
BUILT_SOURCES =
EXTRA_DIST =
CLEANFILES =

SHARED_CFLAGS = \
  -Wall -Wextra -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

###
###
###

noinst_LIBRARIES = libindicatorpower-upower.a libindicatorpower-service.a

libindicatorpower_upower_a_SOURCES = \
  $(upower_dbus_sources) \
  device-provider-upower.c \
  device-provider-upower.h

libindicatorpower_upower_a_CFLAGS = \
	$(SHARED_CFLAGS) \
	-Wno-unused-parameter \
	$(COVERAGE_CFLAGS)

libindciatorpower_upower_a_LDFLAGS = $(COVERAGE_LDFLAGS)

libindicatorpower_service_a_SOURCES = \
  ib-brightness-control.c \
  ib-brightness-control.h \
  ib-brightness-powerd-control.c \
  ib-brightness-powerd-control.h \
  device-provider.c \
  device-provider.h \
  device.c \
  device.h \
  service.c \
  service.h

libindicatorpower_service_a_CFLAGS = \
	$(SHARED_CFLAGS) \
	-Wno-missing-field-initializers \
	$(COVERAGE_CFLAGS)

libindicatorpower_service_a_LDFLAGS = $(COVERAGE_LDFLAGS)

###
###
###

pkglibexec_PROGRAMS = indicator-power-service

indicator_power_service_SOURCES = main.c

indicator_power_service_CFLAGS = \
	$(SHARED_CFLAGS) \
	$(COVERAGE_CFLAGS)

indicator_power_service_LDADD = \
  libindicatorpower-upower.a \
  libindicatorpower-service.a \
  $(SERVICE_DEPS_LIBS)

indicator_power_service_LDFLAGS = \
  $(COVERAGE_LDFLAGS)