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