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