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