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