Makefile.am 3.92 KB
Newer Older
1
2
3
4
5
6
INCLUDES = 						\
	-I$(srcdir)/../../libpanel-applet 		\
	-I$(top_builddir)/libpanel-applet 		\
	$(DISABLE_DEPRECATED_CFLAGS)			\
	$(GNOME_INCLUDEDIR) 				\
	$(WARN_CFLAGS) 					\
7
	$(CLOCK_CFLAGS) 				\
8
	$(LIBPANEL_APPLET_CFLAGS)			\
9
10
11
	-DDATADIR=\""$(datadir)"\"			\
	-DLIBDIR=\""$(libdir)"\"			\
	-DSYSCONFDIR=\""$(sysconfdir)"\"		\
12
13
	-DPREFIX=\""$(prefix)"\"			\
	-DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"  \
14
	-DCLOCK_EDS_ICONDIR="\"$(CLOCK_EDS_ICONDIR)\""	\
15
	-DCLOCK_TIME_UTILITY="\"$(CLOCK_TIME_UTILITY)\""
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
31
32
CLOCK_SOURCES = 		\
	calendar-window.c	\
	calendar-window.h	\
	clock.c			\
	clock.h			\
	$(BUILT_SOURCES)	\
	$(CALENDAR_SOURCES)
33

34
CLOCK_LDADD =						\
35
	../../libpanel-applet/libpanel-applet-2.la	\
36
	$(CLOCK_LIBS)
37

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
BUILT_SOURCES = \
	clock-typebuiltins.c	\
	clock-typebuiltins.h

clock_enum_headers =					\
	$(top_srcdir)/applets/clock/clock.h

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

71
72
if CLOCK_INPROCESS
APPLET_TYPE     = shlib
73
APPLET_LOCATION = $(pkglibdir)/libclock-applet.so
74

75
76
clock_appletlibdir = $(pkglibdir)
clock_appletlib_LTLIBRARIES = libclock-applet.la
77
78
libclock_applet_la_SOURCES = $(CLOCK_SOURCES)
libclock_applet_la_LIBADD = $(CLOCK_LDADD)
79
libclock_applet_la_LDFLAGS = -module -avoid-version
80
libclock_applet_la_CFLAGS =
81
$(libclock_applet_la_OBJECTS): $(BUILT_SOURCES)
82
83
84
85
else
APPLET_TYPE     = exe
APPLET_LOCATION = $(libexecdir)/clock-applet

Mark McLoughlin's avatar
Mark McLoughlin committed
86
libexec_PROGRAMS = clock-applet
87
88
89
clock_applet_SOURCES = $(CLOCK_SOURCES)
clock_applet_LDADD = $(CLOCK_LDADD)
clock_applet_CFLAGS =
90
$(clock_applet_OBJECTS): $(BUILT_SOURCES)
91
endif
92

93
94
uidir 	= $(datadir)/gnome-2.0/ui
ui_DATA	= GNOME_ClockApplet.xml	
95

96
serverdir       = $(libdir)/bonobo/servers
97
server_in_files = GNOME_ClockApplet_Factory.server.in
98
server_DATA     = $(server_in_files:.server.in=.server)
99

100
101
102
$(server_in_files): $(server_in_files).in Makefile
	sed -e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \
	    -e "s|\@TYPE\@|$(APPLET_TYPE)|" \
103
104
105
	    -e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \
	    $< > $@

106
@INTLTOOL_SERVER_RULE@
107

108
schemasdir       = $(GCONF_SCHEMA_FILE_DIR)
109
schemas_in_files = clock.schemas.in
110
111
112
113
schemas_DATA     = $(schemas_in_files:.schemas.in=.schemas)

@INTLTOOL_SCHEMAS_RULE@

114
if GCONF_SCHEMAS_INSTALL
115
# don't do this if we are building in eg. rpm
116
install-data-local:
117
	if test -z "$(DESTDIR)" ; then \
118
		for p in $(schemas_DATA) ; do \
119
		        GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_builddir)/applets/clock/$$p ; \
120
121
		done \
	fi
122
123
124
else
install-data-local:
endif
125

126
127
EXTRA_DIST =						\
	GNOME_ClockApplet_Factory.server.in.in		\
128
	$(schemas_in_files)				\
129
	$(ui_DATA)
130

131
132
133
134
135
CLEANFILES =			\
	$(BUILT_SOURCES)	\
	$(server_in_files)	\
	$(server_DATA)		\
	$(schemas_DATA)