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