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