Makefile.am 4.26 KB
Newer Older
1
2
SUBDIRS = e-map

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

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

29
30
31
CLOCK_SOURCES = 		\
	calendar-window.c	\
	calendar-window.h	\
32
33
34
35
36
37
38
39
40
41
	tz-window.c		\
	tz-window.h		\
	tz-sel-dialog.c		\
	tz-sel-dialog.h		\
 	tz-list.c		\
 	tz-list.h		\
 	tz.c			\
 	tz.h			\
	obox.c			\
	obox.h			\
42
43
	clock.c			\
	clock.h			\
44
45
	clock-utils.c		\
	clock-utils.h		\
46
47
	$(BUILT_SOURCES)	\
	$(CALENDAR_SOURCES)
48

49
CLOCK_LDADD =						\
50
	../../libpanel-applet/libpanel-applet-2.la	\
51
	e-map/libemap.a					\
52
	$(CLOCK_LIBS)
53

54
55
56
57
58
BUILT_SOURCES = \
	clock-typebuiltins.c	\
	clock-typebuiltins.h

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

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) >  $@

87
88
if CLOCK_INPROCESS
APPLET_TYPE     = shlib
89
APPLET_LOCATION = $(pkglibdir)/libclock-applet.so
90

91
92
clock_appletlibdir = $(pkglibdir)
clock_appletlib_LTLIBRARIES = libclock-applet.la
93
94
libclock_applet_la_SOURCES = $(CLOCK_SOURCES)
libclock_applet_la_LIBADD = $(CLOCK_LDADD)
95
libclock_applet_la_LDFLAGS = -module -avoid-version
96
libclock_applet_la_CFLAGS =
97
$(libclock_applet_la_OBJECTS): $(BUILT_SOURCES)
98
99
100
101
else
APPLET_TYPE     = exe
APPLET_LOCATION = $(libexecdir)/clock-applet

Mark McLoughlin's avatar
Mark McLoughlin committed
102
libexec_PROGRAMS = clock-applet
103
104
105
clock_applet_SOURCES = $(CLOCK_SOURCES)
clock_applet_LDADD = $(CLOCK_LDADD)
clock_applet_CFLAGS =
106
$(clock_applet_OBJECTS): $(BUILT_SOURCES)
107
endif
108

109
110
111
gladedir = $(datadir)/gnome-panel/glade
glade_DATA = timezone.glade

112
113
uidir 	= $(datadir)/gnome-2.0/ui
ui_DATA	= GNOME_ClockApplet.xml	
114

115
serverdir       = $(libdir)/bonobo/servers
116
server_in_files = GNOME_ClockApplet_Factory.server.in
117
server_DATA     = $(server_in_files:.server.in=.server)
118

119
120
121
$(server_in_files): $(server_in_files).in Makefile
	sed -e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \
	    -e "s|\@TYPE\@|$(APPLET_TYPE)|" \
122
123
124
	    -e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \
	    $< > $@

125
@INTLTOOL_SERVER_RULE@
126

127
schemasdir       = $(GCONF_SCHEMA_FILE_DIR)
128
schemas_in_files = clock.schemas.in
129
130
131
132
schemas_DATA     = $(schemas_in_files:.schemas.in=.schemas)

@INTLTOOL_SCHEMAS_RULE@

133
if GCONF_SCHEMAS_INSTALL
134
# don't do this if we are building in eg. rpm
135
install-data-local:
136
	if test -z "$(DESTDIR)" ; then \
137
		for p in $(schemas_DATA) ; do \
138
		        GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_builddir)/applets/clock/$$p ; \
139
140
		done \
	fi
141
142
143
else
install-data-local:
endif
144

145
146
EXTRA_DIST =						\
	GNOME_ClockApplet_Factory.server.in.in		\
147
	$(schemas_in_files)				\
148
	$(ui_DATA)
149

150
151
152
153
154
CLEANFILES =			\
	$(BUILT_SOURCES)	\
	$(server_in_files)	\
	$(server_DATA)		\
	$(schemas_DATA)