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