Makefile.am 5.88 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
58
59
60
CLOCK_CPPFLAGS =						\
	$(AM_CPPFLAGS)						\
	$(LIBPANEL_APPLET_CFLAGS)				\
	$(CLOCK_CFLAGS)						\
	-I$(srcdir)/../../libpanel-applet			\
	-I$(top_builddir)/libpanel-applet			\
	-DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"	\
	-DBUILDERDIR=\""$(uidir)"\"				\
	-DCLOCK_MENU_UI_DIR=\""$(xmluidir)"\"			\
	-DICONDIR=\""$(datadir)/gnome-panel/pixmaps"\"		\
	-DCLOCK_EDS_ICONDIR="\"$(CLOCK_EDS_ICONDIR)\""		\
	-DGWEATHER_I_KNOW_THIS_IS_UNSTABLE

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

68
69
test_system_timezone_SOURCES = 	\
	test-system-timezone.c
70
test_system_timezone_LDADD = libsystem-timezone.la
71
72
73

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

76
clock_appletlibdir = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)
77
78
clock_appletlib_LTLIBRARIES = libclock-applet.la
libclock_applet_la_SOURCES = $(CLOCK_SOURCES)
79
libclock_applet_la_CPPFLAGS = $(CLOCK_CPPFLAGS)
80
81
82
83
84
85
86
87
88
89
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)
90
clock_applet_CPPFLAGS = $(CLOCK_CPPFLAGS)
91
92
93
94
clock_applet_LDADD = $(CLOCK_LDADD)
clock_applet_CFLAGS = $(AM_CFLAGS)
$(clock_applet_OBJECTS): $(BUILT_SOURCES)
endif
95

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

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

102
clock_enum_headers =					\
103
	$(top_srcdir)/applets/clock/clock-utils.h
104
105

clock-typebuiltins.c: @REBUILD@ $(clock_enum_headers)
106
	$(AM_V_GEN)glib-mkenums \
107
			--fhead "#include <glib-object.h>\n" \
108
109
110
111
112
113
114
115
116
117
118
119
120
121
			--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)
122
	$(AM_V_GEN)glib-mkenums \
123
			--fhead "#ifndef __CLOCK_TYPEBUILTINS_H__\n" \
124
125
126
127
128
129
130
			--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" \
131
		$(clock_enum_headers) > $@
132

133
134
135
136
137
BUILT_SOURCES =					\
	clock-marshallers.c			\
	clock-marshallers.h			\
	clock-typebuiltins.c			\
	clock-typebuiltins.h
138

139
appletdir       = $(datadir)/gnome-panel/$(LIBPANEL_APPLET_API_VERSION)/applets
140
applet_in_files = org.gnome.panel.ClockApplet.panel-applet.in
141
applet_DATA     = $(applet_in_files:.panel-applet.in=.panel-applet)
142

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

150
151
152
153
154
155
156
157
158
@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 \
159
160
		-e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \
		$< > $@
161
endif
162

163
164
165
166
167
168
uidir		= $(datadir)/gnome-panel/ui
ui_DATA		= clock.ui

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

169
schemasdir       = $(GCONF_SCHEMA_FILE_DIR)
170
schemas_in_files = clock.schemas.in
171
172
173
174
schemas_DATA     = $(schemas_in_files:.schemas.in=.schemas)

@INTLTOOL_SCHEMAS_RULE@

175
if GCONF_SCHEMAS_INSTALL
176
install-data-local:
177
	if test -z "$(DESTDIR)" ; then \
178
		for p in $(schemas_DATA) ; do \
179
			GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_builddir)/applets/clock/$$p ; \
180
181
		done \
	fi
182
183
184
185
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
186
endif
187

188
EXTRA_DIST =						\
189
	org.gnome.panel.ClockApplet.panel-applet.in.in	\
190
	$(schemas_in_files)				\
Vincent Untz's avatar
Vincent Untz committed
191
	$(xmlui_DATA)					\
Vincent Untz's avatar
Vincent Untz committed
192
	$(ui_DATA)					\
193
	clock-marshallers.list				\
194
	$(service_in_files)
195

196
197
CLEANFILES =			\
	$(BUILT_SOURCES)	\
198
199
200
	$(applet_DATA) 		\
	$(applet_DATA).in	\
	$(service_DATA)		\
201
	$(schemas_DATA)		\
202
	$(polkit_DATA)		\
203
	$(dbus_services_DATA)
204
205

-include $(top_srcdir)/git.mk