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