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