]> git.0d.be Git - empathy.git/blob - libempathy-gtk/Makefile.am
First cut at GObject-ifying EmpathyAccountWidget
[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-protocol-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-ui-utils.c
64
65 libempathy_gtk_la_SOURCES =                     \
66         $(libempathy_gtk_handwritten_source)    \
67         totem-subtitle-encoding.c totem-subtitle-encoding.h
68
69 # do not distribute generated files
70 nodist_libempathy_gtk_la_SOURCES =\
71         empathy-account-widget-private.h        \
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-protocol-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-ui-utils.h
125
126 check_c_sources = \
127     $(libempathy_gtk_handwritten_source) \
128     $(libempathy_gtk_headers)
129 include $(top_srcdir)/tools/check-coding-style.mk
130 check-local: check-coding-style
131
132 libempathy_gtk_includedir = $(includedir)/libempathy-gtk/
133 libempathy_gtk_include_HEADERS =                \
134         $(libempathy_gtk_headers)               \
135         empathy-gtk-enum-types.h
136
137 uidir = $(datadir)/empathy
138 ui_DATA =                                       \
139         empathy-contact-widget.ui               \
140         empathy-contact-dialogs.ui              \
141         empathy-account-widget-generic.ui       \
142         empathy-account-widget-jabber.ui        \
143         empathy-account-widget-msn.ui           \
144         empathy-account-widget-sip.ui           \
145         empathy-account-widget-local-xmpp.ui    \
146         empathy-account-widget-irc.ui           \
147         empathy-account-widget-icq.ui           \
148         empathy-account-widget-yahoo.ui         \
149         empathy-account-widget-groupwise.ui     \
150         empathy-account-widget-aim.ui           \
151         empathy-status-preset-dialog.ui         \
152         empathy-log-window.ui                   \
153         empathy-chat.ui                         \
154         empathy-new-message-dialog.ui
155
156 empathy-gtk-marshal.list: $(libempathy_gtk_la_SOURCES) Makefile.am
157         $(QUIET_GEN)( cd $(srcdir) && \
158         sed -n -e 's/.*empathy_gtk_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
159         $(libempathy_gtk_la_SOURCES) ) \
160         | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
161         if cmp -s $@.tmp $@; then \
162                 rm $@.tmp; \
163         else \
164                 mv $@.tmp $@; \
165         fi
166
167 %-marshal.h: %-marshal.list Makefile
168         $(QUIET_GEN)$(GLIB_GENMARSHAL) --header --prefix=_$(subst -,_,$*)_marshal $< > $*-marshal.h
169
170 %-marshal.c: %-marshal.list Makefile
171         $(QUIET_GEN)echo "#include \"empathy-gtk-marshal.h\"" > $@ && \
172         $(GLIB_GENMARSHAL) --body --prefix=_$(subst -,_,$*)_marshal $< >> $*-marshal.c
173
174 empathy-gtk-enum-types.h: stamp-empathy-gtk-enum-types.h
175         $(QUIET_GEN)true
176 stamp-empathy-gtk-enum-types.h: Makefile $(libempathy_gtk_headers)
177         $(QUIET_GEN)(cd $(srcdir) \
178         && glib-mkenums \
179                         --fhead "#ifndef __LIBEMPATHY_GTK_ENUM_TYPES_H__\n" \
180                         --fhead "#define __LIBEMPATHY_GTK_ENUM_TYPES_H__ 1\n\n" \
181                         --fhead "#include <glib-object.h>\n\n" \
182                         --fhead "G_BEGIN_DECLS\n\n" \
183                         --ftail "G_END_DECLS\n\n" \
184                         --ftail "#endif /* __LIBEMPATHY_GTK_ENUM_TYPES_H__ */\n" \
185                         --fprod "#include <libempathy-gtk/@filename@>\n" \
186                         --eprod "#define EMPATHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
187                         --eprod "GType @enum_name@_get_type (void);\n" \
188                 $(libempathy_gtk_headers) ) > xgen-gth \
189         && (cmp -s xgen-gth empathy-gtk-enum-type.h || cp xgen-gth empathy-gtk-enum-types.h) \
190         && rm -f xgen-gth \
191         && echo timestamp > $(@F)
192
193 empathy-gtk-enum-types.c: Makefile $(libempathy_gtk_headers)
194         $(QUIET_GEN)(cd $(srcdir) \
195         && glib-mkenums \
196                         --fhead "#include <config.h>\n" \
197                         --fhead "#include <glib-object.h>\n" \
198                         --fhead "#include \"empathy-gtk-enum-types.h\"\n\n" \
199                         --fprod "\n/* enumerations from \"@filename@\" */" \
200                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
201                         --vprod "  { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
202                         --vtail "  { 0, NULL, NULL }\n};\n\n" \
203                         --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
204                         --vtail "  static GType type = 0;\n\n" \
205                         --vtail "  if (!type)\n" \
206                         --vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
207                         --vtail "  return type;\n}\n\n" \
208                 $(libempathy_gtk_headers) ) > xgen-gtc \
209         && cp xgen-gtc $(@F) \
210         && rm -f xgen-gtc
211
212 pkgconfigdir = $(libdir)/pkgconfig
213 pkgconfig_DATA = libempathy-gtk.pc
214
215 EXTRA_DIST =                    \
216         $(ui_DATA)
217
218 if HAVE_GEOCLUE
219 libempathy_gtk_handwritten_source +=            \
220         empathy-location-manager.c
221
222 libempathy_gtk_headers +=                       \
223         empathy-location-manager.h
224 else
225 EXTRA_DIST +=                                   \
226         empathy-location-manager.c              \
227         empathy-location-manager.h
228 endif
229
230 if HAVE_WEBKIT
231 libempathy_gtk_handwritten_source +=            \
232         empathy-plist.c                         \
233         empathy-theme-adium.c
234 libempathy_gtk_headers +=                       \
235         empathy-plist.h                         \
236         empathy-theme-adium.h
237 else
238 EXTRA_DIST +=                                   \
239         empathy-plist.c                         \
240         empathy-plist.h                         \
241         empathy-theme-adium.c                   \
242         empathy-theme-adium.h
243 endif
244
245 CLEANFILES =                            \
246         $(BUILT_SOURCES)                \
247         stamp-empathy-gtk-enum-types.h