]> git.0d.be Git - empathy.git/blob - libempathy-gtk/Makefile.am
Support silent build rules with automake 1.11
[empathy.git] / libempathy-gtk / Makefile.am
1 include $(top_srcdir)/tools/flymake.mk
2
3 AM_CPPFLAGS =                                           \
4         $(ERROR_CFLAGS)                                 \
5         -I.                                             \
6         -I$(top_srcdir)                                 \
7         -DDATADIR=\""$(datadir)"\"                      \
8         -DPKGDATADIR=\""$(pkgdatadir)"\"                \
9         $(LIBEMPATHYGTK_CFLAGS)                         \
10         $(LIBNOTIFY_CFLAGS)                             \
11         $(ENCHANT_CFLAGS)                               \
12         $(LIBCHAMPLAIN_CFLAGS)                          \
13         $(GEOCLUE_CFLAGS)                               \
14         $(MOBLIN_CFLAGS)                                \
15         $(WEBKIT_CFLAGS)                                \
16         $(WARN_CFLAGS)                                  \
17         $(DISABLE_DEPRECATED)
18
19 BUILT_SOURCES =                                         \
20         empathy-gtk-marshal.h                           \
21         empathy-gtk-marshal.c                           \
22         empathy-gtk-marshal.list                        \
23         empathy-gtk-enum-types.h                        \
24         empathy-gtk-enum-types.c
25
26 noinst_LTLIBRARIES = libempathy-gtk.la
27
28 libempathy_gtk_handwritten_source =             \
29         empathy-account-chooser.c               \
30         empathy-account-widget-irc.c            \
31         empathy-account-widget-private.h        \
32         empathy-account-widget-sip.c            \
33         empathy-account-widget.c                \
34         empathy-audio-sink.c                    \
35         empathy-audio-src.c                     \
36         empathy-avatar-chooser.c                \
37         empathy-avatar-image.c                  \
38         empathy-cell-renderer-activatable.c     \
39         empathy-cell-renderer-expander.c        \
40         empathy-cell-renderer-text.c            \
41         empathy-chat-text-view.c                \
42         empathy-chat-view.c                     \
43         empathy-chat.c                          \
44         empathy-conf.c                          \
45         empathy-contact-dialogs.c               \
46         empathy-contact-list-store.c            \
47         empathy-contact-list-view.c             \
48         empathy-contact-menu.c                  \
49         empathy-contact-selector.c              \
50         empathy-contact-selector-dialog.c \
51         empathy-contact-widget.c                \
52         empathy-geometry.c                      \
53         empathy-irc-network-dialog.c            \
54         empathy-kludge-label.c                  \
55         empathy-log-window.c                    \
56         empathy-new-message-dialog.c            \
57         empathy-new-call-dialog.c               \
58         empathy-notify-manager.c                \
59         empathy-presence-chooser.c              \
60         empathy-protocol-chooser.c              \
61         empathy-search-bar.c                    \
62         empathy-share-my-desktop.c              \
63         empathy-smiley-manager.c                \
64         empathy-sound.c                         \
65         empathy-spell.c                         \
66         empathy-status-preset-dialog.c          \
67         empathy-theme-boxes.c                   \
68         empathy-theme-irc.c                     \
69         empathy-theme-manager.c                 \
70         empathy-ui-utils.c                      \
71         empathy-video-src.c                     \
72         empathy-video-widget.c
73
74 libempathy_gtk_headers =                        \
75         empathy-account-chooser.h               \
76         empathy-account-widget-irc.h            \
77         empathy-account-widget-sip.h            \
78         empathy-account-widget.h                \
79         empathy-audio-sink.h                    \
80         empathy-audio-src.h                     \
81         empathy-avatar-chooser.h                \
82         empathy-avatar-image.h                  \
83         empathy-cell-renderer-activatable.h     \
84         empathy-cell-renderer-expander.h        \
85         empathy-cell-renderer-text.h            \
86         empathy-chat-text-view.h                \
87         empathy-chat-view.h                     \
88         empathy-chat.h                          \
89         empathy-conf.h                          \
90         empathy-contact-dialogs.h               \
91         empathy-contact-list-store.h            \
92         empathy-contact-list-view.h             \
93         empathy-contact-menu.h                  \
94         empathy-contact-selector.h              \
95         empathy-contact-selector-dialog.h \
96         empathy-contact-widget.h                \
97         empathy-geometry.h                      \
98         empathy-images.h                        \
99         empathy-irc-network-dialog.h            \
100         empathy-kludge-label.h                  \
101         empathy-log-window.h                    \
102         empathy-new-message-dialog.h            \
103         empathy-new-call-dialog.h               \
104         empathy-notify-manager.h                \
105         empathy-presence-chooser.h              \
106         empathy-protocol-chooser.h              \
107         empathy-search-bar.h                    \
108         empathy-share-my-desktop.h              \
109         empathy-smiley-manager.h                \
110         empathy-sound.h                         \
111         empathy-spell.h                         \
112         empathy-status-preset-dialog.h          \
113         empathy-theme-boxes.h                   \
114         empathy-theme-irc.h                     \
115         empathy-theme-manager.h                 \
116         empathy-ui-utils.h                      \
117         empathy-video-src.h                     \
118         empathy-video-widget.h
119
120 libempathy_gtk_la_SOURCES =                     \
121         $(libempathy_gtk_handwritten_source)    \
122         $(libempathy_gtk_headers)               \
123         totem-subtitle-encoding.c totem-subtitle-encoding.h
124
125 # do not distribute generated files
126 nodist_libempathy_gtk_la_SOURCES =\
127         $(BUILT_SOURCES)
128
129 libempathy_gtk_la_LIBADD =                      \
130         $(LIBEMPATHYGTK_LIBS)                   \
131         $(LIBNOTIFY_LIBS)                       \
132         $(ENCHANT_LIBS)                         \
133         $(LIBCHAMPLAIN_LIBS)                    \
134         $(GEOCLUE_LIBS)                         \
135         $(MOBLIN_LIBS)                          \
136         $(WEBKIT_LIBS)                          \
137         $(top_builddir)/libempathy/libempathy.la
138
139 check_c_sources = \
140     $(libempathy_gtk_handwritten_source) \
141     $(libempathy_gtk_headers)
142 include $(top_srcdir)/tools/check-coding-style.mk
143 check-local: check-coding-style
144
145 uidir = $(datadir)/empathy
146 ui_DATA =                                       \
147         empathy-contact-widget.ui               \
148         empathy-contact-dialogs.ui              \
149         empathy-account-widget-generic.ui       \
150         empathy-account-widget-jabber.ui        \
151         empathy-account-widget-msn.ui           \
152         empathy-account-widget-sip.ui           \
153         empathy-account-widget-local-xmpp.ui    \
154         empathy-account-widget-irc.ui           \
155         empathy-account-widget-icq.ui           \
156         empathy-account-widget-yahoo.ui         \
157         empathy-account-widget-groupwise.ui     \
158         empathy-account-widget-aim.ui           \
159         empathy-status-preset-dialog.ui         \
160         empathy-log-window.ui                   \
161         empathy-chat.ui                         \
162         empathy-contact-selector-dialog.ui      \
163         empathy-search-bar.ui
164
165 empathy-gtk-marshal.list: $(libempathy_gtk_la_SOURCES) Makefile.am
166         $(AM_V_GEN)( cd $(srcdir) && \
167         sed -n -e 's/.*empathy_gtk_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
168         $(libempathy_gtk_la_SOURCES) ) \
169         | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
170         @if cmp -s $@.tmp $@; then \
171                 rm $@.tmp; \
172         else \
173                 mv $@.tmp $@; \
174         fi
175
176 %-marshal.h: %-marshal.list Makefile
177         $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=_$(subst -,_,$*)_marshal $< > $*-marshal.h
178
179 %-marshal.c: %-marshal.list Makefile
180         $(AM_V_GEN)echo "#include \"empathy-gtk-marshal.h\"" > $@ && \
181         $(GLIB_GENMARSHAL) --body --prefix=_$(subst -,_,$*)_marshal $< >> $*-marshal.c
182
183 empathy-gtk-enum-types.h: stamp-empathy-gtk-enum-types.h
184         $(AM_V_GEN)true
185 stamp-empathy-gtk-enum-types.h: Makefile $(libempathy_gtk_headers)
186         $(AM_V_GEN)(cd $(srcdir) \
187         && glib-mkenums \
188                         --fhead "#ifndef __LIBEMPATHY_GTK_ENUM_TYPES_H__\n" \
189                         --fhead "#define __LIBEMPATHY_GTK_ENUM_TYPES_H__ 1\n\n" \
190                         --fhead "#include <glib-object.h>\n\n" \
191                         --fhead "G_BEGIN_DECLS\n\n" \
192                         --ftail "G_END_DECLS\n\n" \
193                         --ftail "#endif /* __LIBEMPATHY_GTK_ENUM_TYPES_H__ */\n" \
194                         --fprod "#include <libempathy-gtk/@filename@>\n" \
195                         --eprod "#define EMPATHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
196                         --eprod "GType @enum_name@_get_type (void);\n" \
197                 $(libempathy_gtk_headers) ) > xgen-gth \
198         && (cmp -s xgen-gth empathy-gtk-enum-type.h || cp xgen-gth empathy-gtk-enum-types.h) \
199         && rm -f xgen-gth \
200         && echo timestamp > $(@F)
201
202 empathy-gtk-enum-types.c: Makefile $(libempathy_gtk_headers)
203         $(AM_V_GEN)(cd $(srcdir) \
204         && glib-mkenums \
205                         --fhead "#include <config.h>\n" \
206                         --fhead "#include <glib-object.h>\n" \
207                         --fhead "#include \"empathy-gtk-enum-types.h\"\n\n" \
208                         --fprod "\n/* enumerations from \"@filename@\" */" \
209                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
210                         --vprod "  { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
211                         --vtail "  { 0, NULL, NULL }\n};\n\n" \
212                         --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
213                         --vtail "  static GType type = 0;\n\n" \
214                         --vtail "  if (!type)\n" \
215                         --vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
216                         --vtail "  return type;\n}\n\n" \
217                 $(libempathy_gtk_headers) ) > xgen-gtc \
218         && cp xgen-gtc $(@F) \
219         && rm -f xgen-gtc
220
221 EXTRA_DIST =                    \
222         $(ui_DATA)
223
224 if HAVE_GEOCLUE
225 libempathy_gtk_handwritten_source +=            \
226         empathy-location-manager.c
227
228 libempathy_gtk_headers +=                       \
229         empathy-location-manager.h
230 else
231 EXTRA_DIST +=                                   \
232         empathy-location-manager.c              \
233         empathy-location-manager.h
234 endif
235
236 if HAVE_WEBKIT
237 libempathy_gtk_handwritten_source +=            \
238         empathy-plist.c                         \
239         empathy-theme-adium.c
240 libempathy_gtk_headers +=                       \
241         empathy-plist.h                         \
242         empathy-theme-adium.h
243 else
244 EXTRA_DIST +=                                   \
245         empathy-plist.c                         \
246         empathy-plist.h                         \
247         empathy-theme-adium.c                   \
248         empathy-theme-adium.h
249 endif
250
251 CLEANFILES =                            \
252         $(BUILT_SOURCES)                \
253         stamp-empathy-gtk-enum-types.h