Makefile.am 6.79 KB
Newer Older
Vincent Untz's avatar
Vincent Untz committed
1
SUBDIRS = pixmaps
2

3
4
QUIET_GEN = $(Q:@=@echo '  GEN   '$@;)

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
INCLUDES =							\
	-I$(srcdir)/../../libpanel-applet			\
	-I$(top_builddir)/libpanel-applet			\
	$(DISABLE_DEPRECATED_CFLAGS)				\
	$(GNOME_INCLUDEDIR)					\
	$(WARN_CFLAGS)						\
	$(CLOCK_CFLAGS)						\
	$(POLKIT_GNOME_CFLAGS)					\
	$(LIBPANEL_APPLET_CFLAGS)				\
	-DDATADIR=\""$(datadir)"\"				\
	-DGLADEDIR=\""$(datadir)/gnome-panel/glade"\"		\
	-DICONDIR=\""$(datadir)/gnome-panel/pixmaps"\"		\
	-DLIBDIR=\""$(libdir)"\"				\
	-DSYSCONFDIR=\""$(sysconfdir)"\"			\
	-DPREFIX=\""$(prefix)"\"				\
	-DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"	\
	-DCLOCK_EDS_ICONDIR="\"$(CLOCK_EDS_ICONDIR)\""		\
22
	-DGWEATHER_I_KNOW_THIS_IS_UNSTABLE
23

Mark McLoughlin's avatar
Mark McLoughlin committed
24
25
26
27
28
29
30
31
32
if HAVE_LIBECAL
CALENDAR_SOURCES =		\
	calendar-client.c	\
	calendar-client.h	\
	calendar-sources.c	\
	calendar-sources.h	\
	calendar-debug.h
endif

33
34
35
36
37
38
39
40
41
42
if HAVE_POLKIT
SETTIME_SOURCES =		\
	set-timezone.c		\
	set-timezone.h
else
SETTIME_SOURCES =		\
	set-timezone-dummy.c	\
	set-timezone.h
endif

43
44
45
46
47
CLOCK_SOURCES = 		\
	calendar-window.c	\
	calendar-window.h	\
	clock.c			\
	clock.h			\
48
49
50
51
52
53
54
55
56
57
	clock-face.c		\
	clock-face.h		\
	clock-location.c	\
	clock-location.h	\
	clock-location-tile.c	\
	clock-location-tile.h	\
	clock-map.c		\
	clock-map.h		\
	clock-sunpos.c		\
	clock-sunpos.h		\
58
59
	clock-utils.c		\
	clock-utils.h		\
60
	system-timezone.c	\
61
	system-timezone.h	\
62
	$(BUILT_SOURCES)	\
63
64
	$(CALENDAR_SOURCES)	\
	$(SETTIME_SOURCES)
65

66
CLOCK_LDADD =						\
67
	../../libpanel-applet/libpanel-applet-2.la	\
68
	$(CLOCK_LIBS)					\
69
	$(LIBPANEL_APPLET_LIBS)				\
70
71
72
73
74
75
76
	$(POLKIT_GNOME_LIBS)				\
	-lgweather

BUILT_SOURCES =					\
	clock-marshallers.c			\
	clock-marshallers.h			\
	clock-typebuiltins.c			\
77
78
	clock-typebuiltins.h

79
clock-marshallers.c: clock-marshallers.list
80
	$(QUIET_GEN)glib-genmarshal --prefix _clock_marshal --header --body --internal $< > $@
81
82

clock-marshallers.h: clock-marshallers.list
83
	$(QUIET_GEN)glib-genmarshal --prefix _clock_marshal --header --internal $< > $@
84

85
clock_enum_headers =					\
86
	$(top_srcdir)/applets/clock/clock-utils.h
87
88

clock-typebuiltins.c: @REBUILD@ $(clock_enum_headers)
89
90
	$(QUIET_GEN)glib-mkenums \
			--fhead "#include <glib-object.h>\n" \
91
92
93
94
95
96
97
98
99
100
101
102
103
104
			--fhead "#include \"clock-typebuiltins.h\"\n\n" \
			--fprod "\n/* enumerations from \"@filename@\" */" \
			--fprod "\n#include \"@filename@\"\n" \
			--vhead "static const GEnumValue _@enum_name@_values[] = {" \
			--vprod "  { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
			--vtail "  { 0, NULL, NULL }\n};\n\n" \
			--vtail "GType\n@enum_name@_get_type (void)\n{\n" \
			--vtail "  static GType type = 0;\n\n" \
			--vtail "  if (!type)\n" \
			--vtail "    type = g_enum_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
			--vtail "  return type;\n}\n\n" \
		$(clock_enum_headers) > $@

clock-typebuiltins.h: @REBUILD@ $(clock_enum_headers)
105
106
	$(QUIET_GEN)glib-mkenums \
			--fhead "#ifndef __CLOCK_TYPEBUILTINS_H__\n" \
107
108
109
110
111
112
113
114
115
			--fhead "#define __CLOCK_TYPEBUILTINS_H__ 1\n\n" \
			--fhead "G_BEGIN_DECLS\n\n" \
			--ftail "G_END_DECLS\n\n" \
			--ftail "#endif /* __CLOCK_TYPEBUILTINS_H__ */\n" \
			--fprod "\n/* --- @filename@ --- */" \
			--eprod "#define CLOCK_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
			--eprod "GType @enum_name@_get_type (void);\n" \
		$(clock_enum_headers) >  $@

116
gnome-clock-applet-mechanism-glue.h: $(srcdir)/gnome-clock-applet-mechanism.xml
117
118
119
120
	$(QUIET_GEN)dbus-binding-tool \
			--prefix=gnome_clock_applet_mechanism --mode=glib-server	\
			--output=gnome-clock-applet-mechanism-glue.h			\
			$(srcdir)/gnome-clock-applet-mechanism.xml
121
122
123
124

gnome_clock_applet_mechanism_SOURCES =		\
	gnome-clock-applet-mechanism.c		\
	gnome-clock-applet-mechanism.h		\
125
126
127
	gnome-clock-applet-mechanism-main.c	\
	system-timezone.c			\
	system-timezone.h
128
129

if HAVE_POLKIT
130
BUILT_SOURCES += gnome-clock-applet-mechanism-glue.h
131
132
133
134
135
136
137
138
139
140
endif

gnome_clock_applet_mechanism_INCLUDES =	\
	$(CLOCK_MECHANISM_CFLAGS) 	\
	$(POLKIT_GNOME_CFLAGS)

gnome_clock_applet_mechanism_LDADD =	\
	$(CLOCK_MECHANISM_LIBS)		\
	$(POLKIT_GNOME_LIBS)

141
142
if CLOCK_INPROCESS
APPLET_TYPE     = shlib
143
APPLET_LOCATION = $(pkglibdir)/libclock-applet.so
144

145
146
clock_appletlibdir = $(pkglibdir)
clock_appletlib_LTLIBRARIES = libclock-applet.la
147
148
libclock_applet_la_SOURCES = $(CLOCK_SOURCES)
libclock_applet_la_LIBADD = $(CLOCK_LDADD)
149
libclock_applet_la_LDFLAGS = -module -avoid-version
150
libclock_applet_la_CFLAGS =
151
$(libclock_applet_la_OBJECTS): $(BUILT_SOURCES)
152
153

libexec_PROGRAMS = 
154
155
156
157
else
APPLET_TYPE     = exe
APPLET_LOCATION = $(libexecdir)/clock-applet

158
libexec_PROGRAMS = clock-applet 
159
160
161
clock_applet_SOURCES = $(CLOCK_SOURCES)
clock_applet_LDADD = $(CLOCK_LDADD)
clock_applet_CFLAGS =
162
$(clock_applet_OBJECTS): $(BUILT_SOURCES)
163
endif
164

165
166
167
168
if HAVE_POLKIT
libexec_PROGRAMS += gnome-clock-applet-mechanism
endif

169
gladedir = $(datadir)/gnome-panel/glade
170
glade_DATA =		\
171
	clock.glade
172

173
uidir 	= $(datadir)/gnome-2.0/ui
174
ui_DATA	= GNOME_ClockApplet.xml
175

176
serverdir       = $(libdir)/bonobo/servers
177
server_in_files = GNOME_ClockApplet_Factory.server.in
178
server_DATA     = $(server_in_files:.server.in=.server)
179

180
$(server_in_files): $(server_in_files).in Makefile
181
182
	$(QUIET_GEN)sed \
	    -e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \
183
	    -e "s|\@TYPE\@|$(APPLET_TYPE)|" \
184
185
186
	    -e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \
	    $< > $@

187
@INTLTOOL_SERVER_RULE@
188

189
schemasdir       = $(GCONF_SCHEMA_FILE_DIR)
190
schemas_in_files = clock.schemas.in
191
192
193
194
schemas_DATA     = $(schemas_in_files:.schemas.in=.schemas)

@INTLTOOL_SCHEMAS_RULE@

195
if GCONF_SCHEMAS_INSTALL
196
# don't do this if we are building in eg. rpm
197
install-data-local:
198
	if test -z "$(DESTDIR)" ; then \
199
		for p in $(schemas_DATA) ; do \
200
		        GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_builddir)/applets/clock/$$p ; \
201
202
		done \
	fi
203
204
205
else
install-data-local:
endif
206

207
208
209
210
dbus_servicesdir = $(datadir)/dbus-1/system-services
dbus_confdir = $(sysconfdir)/dbus-1/system.d
polkitdir = $(datadir)/PolicyKit/policy

Vincent Untz's avatar
Vincent Untz committed
211
dbus_services_in_files = org.gnome.ClockApplet.Mechanism.service.in
212
polkit_in_files = org.gnome.clockapplet.mechanism.policy.in
Vincent Untz's avatar
Vincent Untz committed
213
214

if HAVE_POLKIT
Vincent Untz's avatar
Vincent Untz committed
215
dbus_services_DATA = $(dbus_services_in_files:.service.in=.service)
216

Vincent Untz's avatar
Vincent Untz committed
217
$(dbus_services_DATA): $(dbus_services_in_files)
218
	$(QUIET_GEN)sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" $< > $@
219
220

dbus_conf_DATA = org.gnome.ClockApplet.Mechanism.conf
221
222

@INTLTOOL_POLICY_RULE@
Vincent Untz's avatar
Vincent Untz committed
223
polkit_DATA = $(polkit_in_files:.policy.in=.policy)
224
225
226
227

check:
	$(POLKIT_POLICY_FILE_VALIDATE) $(polkit_DATA)

228
229
230
231
232
233
else
dbus_services_DATA =
dbus_conf_DATA =
polkit_DATA =
endif

234

235
236
EXTRA_DIST =						\
	GNOME_ClockApplet_Factory.server.in.in		\
237
	$(schemas_in_files)				\
Vincent Untz's avatar
Vincent Untz committed
238
	$(ui_DATA)					\
239
240
	$(glade_DATA)					\
	clock-marshallers.list				\
Vincent Untz's avatar
Vincent Untz committed
241
	$(dbus_services_in_files)			\
242
	org.gnome.ClockApplet.Mechanism.conf		\
Vincent Untz's avatar
Vincent Untz committed
243
	$(polkit_in_files)				\
244
	gnome-clock-applet-mechanism.xml
245

246
247
248
249
CLEANFILES =			\
	$(BUILT_SOURCES)	\
	$(server_in_files)	\
	$(server_DATA)		\
250
	$(schemas_DATA)		\
251
	$(polkit_DATA)		\
252
	$(dbus_services_DATA)
253
254

-include $(top_srcdir)/git.mk