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

3
4
5
noinst_LTLIBRARIES = libsystem-timezone.la
noinst_PROGRAMS = test-system-timezone

6
7
AM_CPPFLAGS =				\
	$(TZ_CFLAGS)			\
8
9
10
11
12
13
14
	$(DISABLE_DEPRECATED_CFLAGS)

AM_CFLAGS = $(WARN_CFLAGS)

libsystem_timezone_la_SOURCES = \
	system-timezone.c	\
	system-timezone.h
15
libsystem_timezone_la_LIBADD = $(TZ_LIBS)
16

Mark McLoughlin's avatar
Mark McLoughlin committed
17
18
19
20
21
22
23
24
25
if HAVE_LIBECAL
CALENDAR_SOURCES =		\
	calendar-client.c	\
	calendar-client.h	\
	calendar-sources.c	\
	calendar-sources.h	\
	calendar-debug.h
endif

26
27
28
29
30
CLOCK_SOURCES = 		\
	calendar-window.c	\
	calendar-window.h	\
	clock.c			\
	clock.h			\
31
32
33
34
35
36
37
38
39
40
	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		\
41
42
	clock-utils.c		\
	clock-utils.h		\
43
44
	set-timezone.c		\
	set-timezone.h		\
45
	$(BUILT_SOURCES)	\
46
	$(CALENDAR_SOURCES)
47

48
49
50
51
52
53
54
55
56
57
CLOCK_CPPFLAGS =						\
	$(AM_CPPFLAGS)						\
	$(LIBPANEL_APPLET_CFLAGS)				\
	$(CLOCK_CFLAGS)						\
	-I$(srcdir)/../../libpanel-applet			\
	-I$(top_builddir)/libpanel-applet			\
	-DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"	\
	-DCLOCK_EDS_ICONDIR="\"$(CLOCK_EDS_ICONDIR)\""		\
	-DGWEATHER_I_KNOW_THIS_IS_UNSTABLE

58
CLOCK_LDADD =						\
Christian Persch's avatar
Christian Persch committed
59
	../../libpanel-applet/libpanel-applet-4.la	\
60
	$(CLOCK_LIBS)					\
61
	$(LIBPANEL_APPLET_LIBS)				\
62
63
	libsystem-timezone.la				\
	-lm
64

65
66
test_system_timezone_SOURCES = 	\
	test-system-timezone.c
67
test_system_timezone_LDADD = libsystem-timezone.la
68
69
70

if CLOCK_INPROCESS
APPLET_IN_PROCESS = true
71
APPLET_LOCATION   = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)/libclock-applet.so
72

73
clock_appletlibdir = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)
74
75
clock_appletlib_LTLIBRARIES = libclock-applet.la
libclock_applet_la_SOURCES = $(CLOCK_SOURCES)
76
libclock_applet_la_CPPFLAGS = $(CLOCK_CPPFLAGS)
77
78
79
80
81
82
83
84
85
86
libclock_applet_la_LIBADD = $(CLOCK_LDADD)
libclock_applet_la_LDFLAGS = -module -avoid-version
libclock_applet_la_CFLAGS = $(AM_CFLAGS)
$(libclock_applet_la_OBJECTS): $(BUILT_SOURCES)
else
APPLET_IN_PROCESS = false
APPLET_LOCATION = $(libexecdir)/clock-applet

libexec_PROGRAMS = clock-applet
clock_applet_SOURCES = $(CLOCK_SOURCES)
87
clock_applet_CPPFLAGS = $(CLOCK_CPPFLAGS)
88
89
90
91
clock_applet_LDADD = $(CLOCK_LDADD)
clock_applet_CFLAGS = $(AM_CFLAGS)
$(clock_applet_OBJECTS): $(BUILT_SOURCES)
endif
92

93
clock-marshallers.c: clock-marshallers.list
94
	$(AM_V_GEN)glib-genmarshal --prefix _clock_marshal --header --body --internal $< > $@
95
96

clock-marshallers.h: clock-marshallers.list
97
	$(AM_V_GEN)glib-genmarshal --prefix _clock_marshal --header --internal $< > $@
98

99
clock_enum_headers =					\
100
	$(top_srcdir)/applets/clock/clock-utils.h
101

102
clock-typebuiltins.c: $(clock_enum_headers)
103
	$(AM_V_GEN)glib-mkenums \
104
			--fhead "#include <glib-object.h>\n" \
105
106
107
108
109
110
111
112
113
114
115
116
117
			--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) > $@

118
clock-typebuiltins.h: $(clock_enum_headers)
119
	$(AM_V_GEN)glib-mkenums \
120
			--fhead "#ifndef __CLOCK_TYPEBUILTINS_H__\n" \
121
122
123
124
125
126
127
			--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" \
128
		$(clock_enum_headers) > $@
129

130
131
132
BUILT_SOURCES =					\
	clock-marshallers.c			\
	clock-marshallers.h			\
Vincent Untz's avatar
Vincent Untz committed
133
134
	clock-resources.c			\
	clock-resources.h			\
135
136
	clock-typebuiltins.c			\
	clock-typebuiltins.h
137

138
appletdir       = $(appletsdir)
139
applet_in_files = org.gnome.panel.ClockApplet.panel-applet.in
140
applet_DATA     = $(applet_in_files:.panel-applet.in=.panel-applet)
141

142
$(applet_in_files): $(applet_in_files).in Makefile
143
	$(AM_V_GEN)sed \
144
145
146
147
		-e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \
		-e "s|\@IN_PROCESS\@|$(APPLET_IN_PROCESS)|" \
		-e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \
		$< > $@
148

149
150
151
152
153
154
155
156
157
@PANEL_INTLTOOL_PANEL_APPLET_RULE@

if !CLOCK_INPROCESS
servicedir       = $(datadir)/dbus-1/services
service_in_files = org.gnome.panel.applet.ClockAppletFactory.service.in
service_DATA     = $(service_in_files:.service.in=.service)

org.gnome.panel.applet.ClockAppletFactory.service: $(service_in_files)
	$(AM_V_GEN)sed \
158
159
		-e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \
		$< > $@
160
endif
161

Vincent Untz's avatar
Vincent Untz committed
162
163
164
ui_FILES =		\
	clock.ui	\
	clock-menu.xml
165

Vincent Untz's avatar
Vincent Untz committed
166
167
168
169
170
clock-resources.c: clock.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies clock.gresource.xml)
	$(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate --c-name clock $(srcdir)/$<

clock-resources.h: clock.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies clock.gresource.xml)
	$(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate --c-name clock $(srcdir)/$<
171

172
schemasdir       = $(GCONF_SCHEMA_FILE_DIR)
173
schemas_in_files = clock.schemas.in
174
175
176
177
schemas_DATA     = $(schemas_in_files:.schemas.in=.schemas)

@INTLTOOL_SCHEMAS_RULE@

178
if GCONF_SCHEMAS_INSTALL
179
install-data-local:
180
	if test -z "$(DESTDIR)" ; then \
181
		for p in $(schemas_DATA) ; do \
182
			GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_builddir)/applets/clock/$$p ; \
183
184
		done \
	fi
185
186
187
188
uninstall-local:
	for p in $(schema_DATA) ; do \
		GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-uninstall-rule $(top_builddir)/applets/clock/$$p ; \
	done
189
endif
190

191
EXTRA_DIST =						\
192
	org.gnome.panel.ClockApplet.panel-applet.in.in	\
193
	$(schemas_in_files)				\
Vincent Untz's avatar
Vincent Untz committed
194
	$(ui_FILES)					\
Vincent Untz's avatar
Vincent Untz committed
195
	clock.gresource.xml				\
196
	clock-marshallers.list				\
197
	$(service_in_files)
198

199
200
CLEANFILES =			\
	$(BUILT_SOURCES)	\
201
202
203
	$(applet_DATA) 		\
	$(applet_DATA).in	\
	$(service_DATA)		\
204
	$(schemas_DATA)		\
205
	$(polkit_DATA)		\
206
	$(dbus_services_DATA)
207
208

-include $(top_srcdir)/git.mk