Move the event manager to src/
[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         totem-subtitle-encoding.c totem-subtitle-encoding.h \
20         empathy-account-chooser.c               \
21         empathy-chat.c                          \
22         empathy-irc-network-dialog.c            \
23         empathy-spell-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
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         $(ENCHANT_LIBS)                         \
59         $(top_builddir)/libempathy/libempathy.la
60
61 libempathy_gtk_la_LDFLAGS =                \
62        -version-info ${LIBEMPATHY_GTK_CURRENT}:${LIBEMPATHY_GTK_REVISION}:${LIBEMPATHY_GTK_AGE} \
63        -export-symbols-regex ^empathy_
64
65 libempathy_gtk_headers =                        \
66         empathy-images.h                        \
67         empathy-account-chooser.h               \
68         empathy-chat.h                          \
69         empathy-irc-network-dialog.h            \
70         empathy-spell-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-account-widget-sip.h            \
79         empathy-contact-dialogs.h               \
80         empathy-new-message-dialog.h            \
81         empathy-theme-irc.h                     \
82         empathy-avatar-chooser.h                \
83         empathy-contact-list-store.h            \
84         empathy-presence-chooser.h              \
85         empathy-theme-manager.h                 \
86         empathy-avatar-image.h                  \
87         empathy-contact-list-view.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-spell.h                         \
97         empathy-contact-menu.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-account-widget-generic.glade    \
110         empathy-account-widget-jabber.glade     \
111         empathy-account-widget-msn.glade        \
112         empathy-account-widget-sip.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-account-widget-groupwise.glade  \
118         empathy-account-widget-aim.glade        \
119         empathy-spell-dialog.glade              \
120         empathy-log-window.glade                \
121         empathy-chat.glade                      \
122         empathy-new-message-dialog.glade
123
124 empathy-gtk-marshal.list: $(libempathy_gtk_la_SOURCES) Makefile.am
125         ( cd $(srcdir) && \
126         sed -n -e 's/.*empathy_gtk_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
127         $(libempathy_gtk_la_SOURCES) ) \
128         | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
129         if cmp -s $@.tmp $@; then \
130                 rm $@.tmp; \
131         else \
132                 mv $@.tmp $@; \
133         fi
134
135 %-marshal.h: %-marshal.list Makefile
136         $(GLIB_GENMARSHAL) --header --prefix=_$(subst -,_,$*)_marshal $< > $*-marshal.h
137
138 %-marshal.c: %-marshal.list Makefile
139         echo "#include \"empathy-gtk-marshal.h\"" > $@ && \
140         $(GLIB_GENMARSHAL) --body --prefix=_$(subst -,_,$*)_marshal $< >> $*-marshal.c
141
142 empathy-gtk-enum-types.h: stamp-empathy-gtk-enum-types.h
143         @true
144 stamp-empathy-gtk-enum-types.h: Makefile $(libempathy_gtk_headers)
145         (cd $(srcdir) \
146         && glib-mkenums \
147                         --fhead "#ifndef __LIBEMPATHY_GTK_ENUM_TYPES_H__\n" \
148                         --fhead "#define __LIBEMPATHY_GTK_ENUM_TYPES_H__ 1\n\n" \
149                         --fhead "#include <glib-object.h>\n\n" \
150                         --fhead "G_BEGIN_DECLS\n\n" \
151                         --ftail "G_END_DECLS\n\n" \
152                         --ftail "#endif /* __LIBEMPATHY_GTK_ENUM_TYPES_H__ */\n" \
153                         --fprod "#include <libempathy-gtk/@filename@>\n" \
154                         --eprod "#define EMPATHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
155                         --eprod "GType @enum_name@_get_type (void);\n" \
156                 $(libempathy_gtk_headers) ) > xgen-gth \
157         && (cmp -s xgen-gth empathy-gtk-enum-type.h || cp xgen-gth empathy-gtk-enum-types.h) \
158         && rm -f xgen-gth \
159         && echo timestamp > $(@F)
160
161 empathy-gtk-enum-types.c: Makefile $(libempathy_gtk_headers)
162         (cd $(srcdir) \
163         && glib-mkenums \
164                         --fhead "#include <config.h>\n" \
165                         --fhead "#include <glib-object.h>\n" \
166                         --fhead "#include \"empathy-gtk-enum-types.h\"\n\n" \
167                         --fprod "\n/* enumerations from \"@filename@\" */" \
168                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
169                         --vprod "  { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
170                         --vtail "  { 0, NULL, NULL }\n};\n\n" \
171                         --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
172                         --vtail "  static GType type = 0;\n\n" \
173                         --vtail "  if (!type)\n" \
174                         --vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
175                         --vtail "  return type;\n}\n\n" \
176                 $(libempathy_gtk_headers) ) > xgen-gtc \
177         && cp xgen-gtc $(@F) \
178         && rm -f xgen-gtc
179
180 pkgconfigdir = $(libdir)/pkgconfig
181 pkgconfig_DATA = libempathy-gtk.pc
182
183 EXTRA_DIST =                    \
184         $(glade_DATA)
185
186 CLEANFILES =                            \
187         $(BUILT_SOURCES)                \
188         stamp-empathy-gtk-enum-types.h