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