aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.am
blob: a02c5a4d5282aa6dbb57260ccf9532b18318a9b3 (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
libexec_PROGRAMS = indicator-sound-service

###################
# Indicator Stuff
###################

soundmenulibdir = $(INDICATORDIR)
soundmenulib_LTLIBRARIES = libsoundmenu.la
libsoundmenu_la_SOURCES = \
        common-defs.h \
	indicator-sound.h \
	transport-widget.c \
	transport-widget.h \
	metadata-widget.c \
	metadata-widget.h \
	play-button.c \
	play-button.h \
	indicator-sound.c \
	title-widget.c \
	title-widget.h \
	scrub-widget.h \
	dbus-shared-names.h \
  sound-service-client.h 

libsoundmenu_la_CFLAGS = $(APPLET_CFLAGS) -Wall -DG_LOG_DOMAIN=\"Indicator-Sound\"
libsoundmenu_la_LIBADD = $(APPLET_LIBS)
libsoundmenu_la_LDFLAGS = -module -avoid-version

checkxml: $(srcdir)/sound-service.xml
	@xmllint -valid -noout $<
	@echo $< checks out ok

sound-service-client.h: $(srcdir)/sound-service.xml
	dbus-binding-tool \
		--prefix=_sound_service_client \
		--mode=glib-client \
		--output=sound-service-client.h \
		$(srcdir)/sound-service.xml


####################################################################
# Sound Service 
####################################################################

#################
# dbus interface
#################
sound-service-server.h: $(srcdir)/sound-service.xml
	dbus-binding-tool \
		--prefix=_sound_service_server \
		--mode=glib-server \
		--output=sound-service-server.h \
		$(srcdir)/sound-service.xml

#####################
# libsoundmenu vala
#####################
music_bridge_VALASOURCES = \
	music-player-bridge.vala \
	transport-menu-item.vala \
	metadata-menu-item.vala \
	scrub-menu-item.vala \
	title-menu-item.vala \
	player-controller.vala \
	mpris-controller-v2.vala \
	mpris-controller.vala \
	player-item.vala \
	familiar-players-db.vala

music_bridge_VALAFLAGS = \
  --ccode \
  -H music-player-bridge.h -d . \
  --vapidir=$(top_srcdir)/vapi/ \
  --vapidir=./ \
  --thread \
  --pkg gee-1.0 \
  --pkg Indicate-0.2 \
  --pkg Dbusmenu-Glib-0.2 \
  --pkg common-defs \
	--pkg dbus-glib-1 \
	--pkg gio-unix-2.0 
 $(MAINTAINER_VALAFLAGS)

music_bridge_APIFILES = \
  music-player-bridge.h 

music_bridge_vala.stamp $(music_bridge_APIFILES): $(music_bridge_VALASOURCES)
	$(AM_V_GEN) $(VALAC) $(music_bridge_VALAFLAGS) $^
	touch music_bridge_vala.stamp

###############################
# libsoundmenu C
###############################
indicator_sound_service_SOURCES = \
	common-defs.h \
  sound-service.h \
  sound-service.c \
  dbus-menu-manager.c \
  dbus-menu-manager.h \
  pulse-manager.h \
  pulse-manager.c \
  sound-service-dbus.h \
  sound-service-dbus.c \
  sound-service-server.h \
  slider-menu-item.h \
  slider-menu-item.c \
  $(music_bridge_VALASOURCES:.vala=.c)

indicator_sound_service_CFLAGS = $(PULSEAUDIO_CFLAGS) $(SOUNDSERVICE_CFLAGS) $(GCONF_CFLAGS) -DLIBEXECDIR=\"$(libexecdir)\" -Wall
indicator_sound_service_LDADD = $(PULSEAUDIO_LIBS) $(SOUNDSERVICE_LIBS) $(GCONF_LIBS)

#########################
# Extra stuff to package
#########################
EXTRA_DIST = \
  sound-service.xml \
  sound-service.list \
  $(music_bridge_APIFILES) \
  $(music_bridge_VALASOURCES)

#######################
# Stuff to clean Stuff
#######################
BUILT_SOURCES = \
	music_bridge_vala.stamp \
	sound-service-client.h \
  sound-service-server.h \
  $(music_bridge_APIFILES) \
  $(music_bridge_VALASOURCES:.vala=.c)

CLEANFILES = \
	$(BUILT_SOURCES)