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