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