]> git.0d.be Git - empathy.git/blob - libempathy-gtk/Makefile.am
b9c4485813172fed9d984766046a397b86f26343
[empathy.git] / libempathy-gtk / Makefile.am
1 AM_CPPFLAGS =                                           \
2         -I.                                             \
3         -I$(top_srcdir)                                 \
4         -DDATADIR=\""$(datadir)"\"                      \
5         -DPKGDATADIR=\""$(pkgdatadir)"\"                \
6         $(EMPATHY_CFLAGS)                               \
7         $(ENCHANT_CFLAGS)                               \
8         $(WARN_CFLAGS)
9
10 BUILT_SOURCES =                                         \
11         empathy-gtk-marshal.h                           \
12         empathy-gtk-marshal.c                           \
13         empathy-gtk-marshal.list                        \
14         empathy-gtk-enum-types.h                        \
15         empathy-gtk-enum-types.c
16
17 lib_LTLIBRARIES = libempathy-gtk.la
18
19 libempathy_gtk_la_SOURCES =                     \
20         empathy-account-chooser.c               \
21         empathy-account-widget.c                \
22         empathy-account-widget-irc.c            \
23         empathy-account-widget-sip.c            \
24         empathy-avatar-chooser.c                \
25         empathy-avatar-image.c                  \
26         empathy-cell-renderer-activatable.c     \
27         empathy-cell-renderer-expander.c        \
28         empathy-cell-renderer-text.c            \
29         empathy-chat.c                          \
30         empathy-chat-text-view.c                \
31         empathy-chat-view.c                     \
32         empathy-conf.c                          \
33         empathy-contact-dialogs.c               \
34         empathy-contact-list-store.c            \
35         empathy-contact-list-view.c             \
36         empathy-contact-menu.c                  \
37         empathy-contact-selector.c              \
38         empathy-contact-widget.c                \
39         empathy-geometry.c                      \
40         empathy-irc-network-dialog.c            \
41         empathy-log-window.c                    \
42         empathy-new-message-dialog.c            \
43         empathy-presence-chooser.c              \
44         empathy-profile-chooser.c               \
45         empathy-smiley-manager.c                \
46         empathy-spell.c                         \
47         empathy-spell-dialog.c                  \
48         empathy-theme-boxes.c                   \
49         empathy-theme-irc.c                     \
50         empathy-theme-manager.c                 \
51         empathy-ui-utils.c                      \
52         totem-subtitle-encoding.c totem-subtitle-encoding.h
53
54 # do not distribute generated files
55 nodist_libempathy_gtk_la_SOURCES =\
56         $(BUILT_SOURCES)
57
58 libempathy_gtk_la_LIBADD =                      \
59         $(EMPATHY_LIBS)                         \
60         $(ENCHANT_LIBS)                         \
61         $(top_builddir)/libempathy/libempathy.la
62
63 libempathy_gtk_la_LDFLAGS =                \
64        -version-info ${LIBEMPATHY_GTK_CURRENT}:${LIBEMPATHY_GTK_REVISION}:${LIBEMPATHY_GTK_AGE} \
65        -export-symbols-regex ^empathy_
66
67 libempathy_gtk_headers =                        \
68         empathy-account-chooser.h               \
69         empathy-account-widget.h                \
70         empathy-account-widget-irc.h            \
71         empathy-account-widget-sip.h            \
72         empathy-avatar-chooser.h                \
73         empathy-avatar-image.h                  \
74         empathy-cell-renderer-activatable.h     \
75         empathy-cell-renderer-expander.h        \
76         empathy-cell-renderer-text.h            \
77         empathy-chat.h                          \
78         empathy-chat-text-view.h                \
79         empathy-chat-view.h                     \
80         empathy-conf.h                          \
81         empathy-contact-dialogs.h               \
82         empathy-contact-list-store.h            \
83         empathy-contact-list-view.h             \
84         empathy-contact-menu.h                  \
85         empathy-contact-selector.h              \
86         empathy-contact-widget.h                \
87         empathy-geometry.h                      \
88         empathy-images.h                        \
89         empathy-irc-network-dialog.h            \
90         empathy-log-window.h                    \
91         empathy-new-message-dialog.h            \
92         empathy-presence-chooser.h              \
93         empathy-profile-chooser.h               \
94         empathy-smiley-manager.h                \
95         empathy-spell.h                         \
96         empathy-spell-dialog.h                  \
97         empathy-theme-boxes.h                   \
98         empathy-theme-irc.h                     \
99         empathy-theme-manager.h                 \
100         empathy-ui-utils.h
101
102 libempathy_gtk_includedir = $(includedir)/libempathy-gtk/
103 libempathy_gtk_include_HEADERS =                \
104         $(libempathy_gtk_headers)               \
105         empathy-gtk-enum-types.h
106
107 gladedir = $(datadir)/empathy
108 glade_DATA =                                    \
109         empathy-contact-widget.glade            \
110         empathy-contact-dialogs.glade           \
111         empathy-presence-chooser.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