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

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

AM_CPPFLAGS =							\
	$(LIBPANEL_APPLET_CFLAGS)				\
	$(CLOCK_CFLAGS)						\
9
10
	-I$(srcdir)/../../libpanel-applet			\
	-I$(top_builddir)/libpanel-applet			\
11
	-DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"	\
Vincent Untz's avatar
Vincent Untz committed
12
	-DBUILDERDIR=\""$(uidir)"\"				\
13
	-DCLOCK_MENU_UI_DIR=\""$(xmluidir)"\"			\
14
15
	-DICONDIR=\""$(datadir)/gnome-panel/pixmaps"\"		\
	-DCLOCK_EDS_ICONDIR="\"$(CLOCK_EDS_ICONDIR)\""		\
16
17
18
19
20
21
22
23
	-DGWEATHER_I_KNOW_THIS_IS_UNSTABLE			\
	$(DISABLE_DEPRECATED_CFLAGS)

AM_CFLAGS = $(WARN_CFLAGS)

libsystem_timezone_la_SOURCES = \
	system-timezone.c	\
	system-timezone.h
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
CLOCK_SOURCES = 		\
	calendar-window.c	\
	calendar-window.h	\
	clock.c			\
	clock.h			\
39
40
41
42
43
44
45
46
47
48
	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		\
49
50
	clock-utils.c		\
	clock-utils.h		\
51
52
	set-timezone.c		\
	set-timezone.h		\
53
	$(BUILT_SOURCES)	\
54
	$(CALENDAR_SOURCES)
55

56
CLOCK_LDADD =						\
57
	../../libpanel-applet/libpanel-applet-3.la	\
58
	$(CLOCK_LIBS)					\
59
	$(LIBPANEL_APPLET_LIBS)				\
60
61
	libsystem-timezone.la				\
	-lm
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
test_system_timezone_SOURCES = 	\
	test-system-timezone.c
test_system_timezone_LDADD = $(CLOCK_LDADD) libsystem-timezone.la

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

clock_appletlibdir = $(pkglibdir)
clock_appletlib_LTLIBRARIES = libclock-applet.la
libclock_applet_la_SOURCES = $(CLOCK_SOURCES)
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)
clock_applet_LDADD = $(CLOCK_LDADD)
clock_applet_CFLAGS = $(AM_CFLAGS)
$(clock_applet_OBJECTS): $(BUILT_SOURCES)
endif
88

89
clock-marshallers.c: clock-marshallers.list
90
	$(AM_V_GEN)glib-genmarshal --prefix _clock_marshal --header --body --internal $< > $@
91
92

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

95
clock_enum_headers =					\
96
	$(top_srcdir)/applets/clock/clock-utils.h
97
98

clock-typebuiltins.c: @REBUILD@ $(clock_enum_headers)
99
	$(AM_V_GEN)glib-mkenums \
100
			--fhead "#include <glib-object.h>\n" \
101
102
103
104
105
106
107
108
109
110
111
112
113
114
			--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)
115
	$(AM_V_GEN)glib-mkenums \
116
			--fhead "#ifndef __CLOCK_TYPEBUILTINS_H__\n" \
117
118
119
120
121
122
123
			--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" \
124
		$(clock_enum_headers) > $@
125

126
127
128
129
130
BUILT_SOURCES =					\
	clock-marshallers.c			\
	clock-marshallers.h			\
	clock-typebuiltins.c			\
	clock-typebuiltins.h
131

132
appletdir       = $(datadir)/gnome-panel/applets
133
applet_in_files = org.gnome.panel.ClockApplet.panel-applet.in
134
applet_DATA     = $(applet_in_files:.panel-applet.in=.panel-applet)
135

136
$(applet_in_files): $(applet_in_files).in Makefile
137
	$(AM_V_GEN)sed \
138
139
140
141
		-e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \
		-e "s|\@IN_PROCESS\@|$(APPLET_IN_PROCESS)|" \
		-e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \
		$< > $@
142

143
144
145
146
147
148
149
150
151
@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 \
152
153
		-e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \
		$< > $@
154
endif
155

156
157
158
159
160
161
uidir		= $(datadir)/gnome-panel/ui
ui_DATA		= clock.ui

xmluidir 	= $(datadir)/gnome-panel/ui
xmlui_DATA	= clock-menu.xml

162
schemasdir       = $(GCONF_SCHEMA_FILE_DIR)
163
schemas_in_files = clock.schemas.in
164
165
166
167
schemas_DATA     = $(schemas_in_files:.schemas.in=.schemas)

@INTLTOOL_SCHEMAS_RULE@

168
if GCONF_SCHEMAS_INSTALL
169
install-data-local:
170
	if test -z "$(DESTDIR)" ; then \
171
		for p in $(schemas_DATA) ; do \
172
			GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_builddir)/applets/clock/$$p ; \
173
174
		done \
	fi
175
176
177
178
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
179
endif
180

181
EXTRA_DIST =						\
182
	org.gnome.panel.ClockApplet.panel-applet.in.in	\
183
	$(schemas_in_files)				\
Vincent Untz's avatar
Vincent Untz committed
184
	$(xmlui_DATA)					\
Vincent Untz's avatar
Vincent Untz committed
185
	$(ui_DATA)					\
186
	clock-marshallers.list				\
187
	$(service_in_files)
188

189
190
CLEANFILES =			\
	$(BUILT_SOURCES)	\
191
192
193
	$(applet_DATA) 		\
	$(applet_DATA).in	\
	$(service_DATA)		\
194
	$(schemas_DATA)		\
195
	$(polkit_DATA)		\
196
	$(dbus_services_DATA)
197
198

-include $(top_srcdir)/git.mk