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