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