Makefile.am 6.78 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
SUBDIRS = e-map pixmaps

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)\""		\
	-DCLOCK_TIME_UTILITY="\"$(CLOCK_TIME_UTILITY)\""	\
	-DEVOLUTION_TEXTDOMAIN=\"evolution-2.12\"		\
22
23
	-DSYSTEM_ZONEINFODIR=\"/usr/share/zoneinfo\"		\
	-DGWEATHER_I_KNOW_THIS_IS_UNSTABLE
24

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

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

44
45
46
CLOCK_SOURCES = 		\
	calendar-window.c	\
	calendar-window.h	\
47
48
49
50
	tz-window.c		\
	tz-window.h		\
	tz-sel-dialog.c		\
	tz-sel-dialog.h		\
51
52
53
54
	tz-list.c		\
	tz-list.h		\
	tz.c			\
	tz.h			\
55
56
	obox.c			\
	obox.h			\
57
58
	clock.c			\
	clock.h			\
59
60
61
62
63
64
65
66
67
68
69
70
	clock-country.c		\
	clock-country.h		\
	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		\
71
72
	clock-utils.c		\
	clock-utils.h		\
73
74
75
76
77
78
	clock-zoneinfo.c	\
	clock-zoneinfo.h	\
	clock-zonetable.c	\
	clock-zonetable.h	\
	gweather-xml.c		\
	gweather-xml.h		\
79
	$(BUILT_SOURCES)	\
80
81
	$(CALENDAR_SOURCES)	\
	$(SETTIME_SOURCES)
82

83
CLOCK_LDADD =						\
84
	../../libpanel-applet/libpanel-applet-2.la	\
85
	e-map/libemap.a					\
86
87
88
89
90
91
92
93
	$(CLOCK_LIBS)					\
	$(POLKIT_GNOME_LIBS)				\
	-lgweather

BUILT_SOURCES =					\
	clock-marshallers.c			\
	clock-marshallers.h			\
	clock-typebuiltins.c			\
94
95
	clock-typebuiltins.h

96
97
98
99
100
101
clock-marshallers.c: clock-marshallers.list
	glib-genmarshal --prefix _clock_marshal --body $< > $@

clock-marshallers.h: clock-marshallers.list
	glib-genmarshal --prefix _clock_marshal --header $< > $@

102
clock_enum_headers =					\
103
	$(top_srcdir)/applets/clock/clock-utils.h
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

clock-typebuiltins.c: @REBUILD@ $(clock_enum_headers)
	glib-mkenums    --fhead "#include <glib-object.h>\n" \
			--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)
	glib-mkenums    --fhead "#ifndef __CLOCK_TYPEBUILTINS_H__\n" \
			--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) >  $@

131
132
133
134
135
136
137
138
139
140
141
gnome-clock-applet-mechanism-glue.h: $(srcdir)/gnome-clock-applet-mechanism.xml
	dbus-binding-tool --prefix=gnome_clock_applet_mechanism --mode=glib-server	\
			  --output=gnome-clock-applet-mechanism-glue.h			\
			  $(srcdir)/gnome-clock-applet-mechanism.xml

gnome_clock_applet_mechanism_SOURCES =		\
	gnome-clock-applet-mechanism.c		\
	gnome-clock-applet-mechanism.h		\
	gnome-clock-applet-mechanism-main.c

if HAVE_POLKIT
142
BUILT_SOURCES += gnome-clock-applet-mechanism-glue.h
143
144
145
146
147
148
149
150
151
152
endif

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

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

153
154
if CLOCK_INPROCESS
APPLET_TYPE     = shlib
155
APPLET_LOCATION = $(pkglibdir)/libclock-applet.so
156

157
158
clock_appletlibdir = $(pkglibdir)
clock_appletlib_LTLIBRARIES = libclock-applet.la
159
160
libclock_applet_la_SOURCES = $(CLOCK_SOURCES)
libclock_applet_la_LIBADD = $(CLOCK_LDADD)
161
libclock_applet_la_LDFLAGS = -module -avoid-version
162
libclock_applet_la_CFLAGS =
163
$(libclock_applet_la_OBJECTS): $(BUILT_SOURCES)
164
165

libexec_PROGRAMS = 
166
167
168
169
else
APPLET_TYPE     = exe
APPLET_LOCATION = $(libexecdir)/clock-applet

170
libexec_PROGRAMS = clock-applet 
171
172
173
clock_applet_SOURCES = $(CLOCK_SOURCES)
clock_applet_LDADD = $(CLOCK_LDADD)
clock_applet_CFLAGS =
174
$(clock_applet_OBJECTS): $(BUILT_SOURCES)
175
endif
176

177
178
179
180
if HAVE_POLKIT
libexec_PROGRAMS += gnome-clock-applet-mechanism
endif

181
gladedir = $(datadir)/gnome-panel/glade
182
183
184
glade_DATA =		\
	clock.glade	\
	timezone.glade
185

186
uidir 	= $(datadir)/gnome-2.0/ui
187
ui_DATA	= GNOME_ClockApplet.xml
188

189
serverdir       = $(libdir)/bonobo/servers
190
server_in_files = GNOME_ClockApplet_Factory.server.in
191
server_DATA     = $(server_in_files:.server.in=.server)
192

193
194
195
$(server_in_files): $(server_in_files).in Makefile
	sed -e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \
	    -e "s|\@TYPE\@|$(APPLET_TYPE)|" \
196
197
198
	    -e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \
	    $< > $@

199
@INTLTOOL_SERVER_RULE@
200

201
schemasdir       = $(GCONF_SCHEMA_FILE_DIR)
202
schemas_in_files = clock.schemas.in
203
204
205
206
schemas_DATA     = $(schemas_in_files:.schemas.in=.schemas)

@INTLTOOL_SCHEMAS_RULE@

207
if GCONF_SCHEMAS_INSTALL
208
# don't do this if we are building in eg. rpm
209
install-data-local:
210
	if test -z "$(DESTDIR)" ; then \
211
		for p in $(schemas_DATA) ; do \
212
		        GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_builddir)/applets/clock/$$p ; \
213
214
		done \
	fi
215
216
217
else
install-data-local:
endif
218

219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
dbus_servicesdir = $(datadir)/dbus-1/system-services
dbus_confdir = $(sysconfdir)/dbus-1/system.d
polkitdir = $(datadir)/PolicyKit/policy

if HAVE_POLKIT
dbus_services_DATA = org.gnome.ClockApplet.Mechanism.service

$(dbus_services_DATA): $(dbus_services_DATA:.service=.service.in)
	sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" $< > $@

dbus_conf_DATA = org.gnome.ClockApplet.Mechanism.conf
polkit_DATA = gnome-clock-applet-mechanism.policy
else
dbus_services_DATA =
dbus_conf_DATA =
polkit_DATA =
endif

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

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