aboutsummaryrefslogtreecommitdiff
path: root/libindicator/Makefile.am
blob: f942f0d94858107d2cb167e5465b5a058eaa8dae (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
BUILT_SOURCES = indicator-object-enum-types.h indicator-object-enum-types.c
CLEANFILES =
DISTCLEANFILES =
EXTRA_DIST = \
	indicator.pc.in

include $(top_srcdir)/Makefile.am.marshal

libindicatorincludedir=$(includedir)/libindicator-0.3/libindicator

indicator_headers = \
	indicator.h \
	indicator-desktop-shortcuts.h \
	indicator-image-helper.h \
	indicator-object.h \
	indicator-service.h \
	indicator-service-manager.h

libindicatorinclude_HEADERS = \
	$(indicator_headers)

lib_LTLIBRARIES = \
	libindicator.la

libindicator_la_SOURCES = \
	$(indicator_headers) \
	dbus-shared.h \
	indicator-object.c \
	indicator-object-enum-types.c \
	indicator-desktop-shortcuts.c \
	indicator-image-helper.c \
	indicator-object-marshal.h \
	indicator-object-marshal.c \
	indicator-service.c \
	indicator-service-manager.c

libindicator_la_CFLAGS = \
	$(LIBINDICATOR_CFLAGS) \
	-DG_LOG_DOMAIN=\"libindicator\" \
	-Wall -Werror

libindicator_la_LIBADD = \
	$(LIBINDICATOR_LIBS)

libindicator_la_LDFLAGS = \
	-version-info 1:0:0 \
	-no-undefined \
	-export-symbols-regex "^[^_].*"

pkgconfig_DATA = indicator.pc
pkgconfigdir = $(libdir)/pkgconfig

glib_marshal_list = indicator-object-marshal.list
glib_marshal_prefix = _indicator_object_marshal

indicator-object-enum-types.h: s-enum-types-h
	@true
s-enum-types-h: $(indicator_headers)
	( cd $(srcdir) && $(GLIB_MKENUMS) --template $(srcdir)/indicator-object-enum-types.h.template								\
		$(indicator_headers) ) >> tmp-indicator-object-enum-types.h											\
	&& (cmp -s tmp-indicator-object-enum-types.h indicator-object-enum-types.h || cp tmp-indicator-object-enum-types.h indicator-object-enum-types.h )	\
	&& rm -f tmp-indicator-object-enum-types.h && echo timestamp > $(@F)

indicator-object-enum-types.c: s-enum-types-c
	@true
s-enum-types-c: $(indicator_headers)
	( cd $(srcdir) && $(GLIB_MKENUMS) --template $(srcdir)/indicator-object-enum-types.c.template								\
		$(indicator_headers) ) > tmp-indicator-object-enum-types.c											\
	&& (cmp -s tmp-indicator-object-enum-types.c indicator-object-enum-types.c || cp tmp-indicator-object-enum-types.c indicator-object-enum-types.c )	\
	&& rm -f tmp-indicator-object-enum-types.c

EXTRA_DIST += indicator-object-enum-types.h.template indicator-object-enum-types.c.template
CLEANFILES +=						\
	indicator-object-enum-types.h			\
	indicator-object-enum-types.c			\
	s-enum-types-h					\
	s-enum-types-c

##################################
# DBus Specs
##################################

DBUS_SPECS = \
	indicator-service.xml

%-client.h: %.xml
	dbus-binding-tool \
		--prefix=_$(subst -,_,$(basename $(notdir $<)))_client \
		--mode=glib-client \
		--output=$@ \
		$<

%-server.h: %.xml
	dbus-binding-tool \
		--prefix=_$(subst -,_,$(basename $(notdir $<)))_server \
		--mode=glib-server \
		--output=$@ \
		$<

BUILT_SOURCES += \
	$(DBUS_SPECS:.xml=-client.h) \
	$(DBUS_SPECS:.xml=-server.h)

CLEANFILES += $(BUILT_SOURCES)

EXTRA_DIST += $(DBUS_SPECS)