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