]> git.0d.be Git - empathy.git/blob - libempathy-gtk/Makefile.am
1317cc7a2ebb324297c8e8a2ec66778b81103181
[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         empathy-event-manager.c
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-chat-view.h                     \
73         empathy-log-window.h                    \
74         empathy-theme-boxes.h                   \
75         empathy-account-widget.h                \
76         empathy-conf.h                          \
77         empathy-theme.h                         \
78         empathy-account-widget-irc.h            \
79         empathy-account-widget-sip.h            \
80         empathy-contact-dialogs.h               \
81         empathy-new-message-dialog.h            \
82         empathy-theme-irc.h                     \
83         empathy-avatar-chooser.h                \
84         empathy-contact-list-store.h            \
85         empathy-presence-chooser.h              \
86         empathy-theme-manager.h                 \
87         empathy-avatar-image.h                  \
88         empathy-contact-list-view.h             \
89         empathy-ui-utils.h                      \
90         empathy-cell-renderer-activatable.h     \
91         empathy-contact-widget.h                \
92         empathy-profile-chooser.h               \
93         empathy-cell-renderer-expander.h        \
94         empathy-geometry.h                      \
95         empathy-smiley-manager.h                \
96         empathy-cell-renderer-text.h            \
97         empathy-spell.h                         \
98         empathy-contact-menu.h                  \
99         empathy-event-manager.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-account-widget-generic.glade    \
112         empathy-account-widget-jabber.glade     \
113         empathy-account-widget-msn.glade        \
114         empathy-account-widget-sip.glade        \
115         empathy-account-widget-salut.glade      \
116         empathy-account-widget-irc.glade        \
117         empathy-account-widget-icq.glade        \
118         empathy-account-widget-yahoo.glade      \
119         empathy-account-widget-groupwise.glade  \
120         empathy-account-widget-aim.glade        \
121         empathy-spell-dialog.glade              \
122         empathy-log-window.glade                \
123         empathy-chat.glade                      \
124         empathy-new-message-dialog.glade
125
126 empathy-gtk-marshal.list: $(libempathy_gtk_la_SOURCES) Makefile.am
127         ( cd $(srcdir) && \
128         sed -n -e 's/.*empathy_gtk_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
129         $(libempathy_gtk_la_SOURCES) ) \
130         | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
131         if cmp -s $@.tmp $@; then \
132                 rm $@.tmp; \
133         else \
134                 mv $@.tmp $@; \
135         fi
136
137 %-marshal.h: %-marshal.list Makefile
138         $(GLIB_GENMARSHAL) --header --prefix=_$(subst -,_,$*)_marshal $< > $*-marshal.h
139
140 %-marshal.c: %-marshal.list Makefile
141         echo "#include \"empathy-gtk-marshal.h\"" > $@ && \
142         $(GLIB_GENMARSHAL) --body --prefix=_$(subst -,_,$*)_marshal $< >> $*-marshal.c
143
144 empathy-gtk-enum-types.h: stamp-empathy-gtk-enum-types.h
145         @true
146 stamp-empathy-gtk-enum-types.h: Makefile $(libempathy_gtk_headers)
147         (cd $(srcdir) \
148         && glib-mkenums \
149                         --fhead "#ifndef __LIBEMPATHY_GTK_ENUM_TYPES_H__\n" \
150                         --fhead "#define __LIBEMPATHY_GTK_ENUM_TYPES_H__ 1\n\n" \
151                         --fhead "#include <glib-object.h>\n\n" \
152                         --fhead "G_BEGIN_DECLS\n\n" \
153                         --ftail "G_END_DECLS\n\n" \
154                         --ftail "#endif /* __LIBEMPATHY_GTK_ENUM_TYPES_H__ */\n" \
155                         --fprod "#include <libempathy-gtk/@filename@>\n" \
156                         --eprod "#define EMPATHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
157                         --eprod "GType @enum_name@_get_type (void);\n" \
158                 $(libempathy_gtk_headers) ) > xgen-gth \
159         && (cmp -s xgen-gth empathy-gtk-enum-type.h || cp xgen-gth empathy-gtk-enum-types.h) \
160         && rm -f xgen-gth \
161         && echo timestamp > $(@F)
162
163 empathy-gtk-enum-types.c: Makefile $(libempathy_gtk_headers)
164         (cd $(srcdir) \
165         && glib-mkenums \
166                         --fhead "#include <config.h>\n" \
167                         --fhead "#include <glib-object.h>\n" \
168                         --fhead "#include \"empathy-gtk-enum-types.h\"\n\n" \
169                         --fprod "\n/* enumerations from \"@filename@\" */" \
170                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
171                         --vprod "  { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
172                         --vtail "  { 0, NULL, NULL }\n};\n\n" \
173                         --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
174                         --vtail "  static GType type = 0;\n\n" \
175                         --vtail "  if (!type)\n" \
176                         --vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
177                         --vtail "  return type;\n}\n\n" \
178                 $(libempathy_gtk_headers) ) > xgen-gtc \
179         && cp xgen-gtc $(@F) \
180         && rm -f xgen-gtc
181
182 pkgconfigdir = $(libdir)/pkgconfig
183 pkgconfig_DATA = libempathy-gtk.pc
184
185 EXTRA_DIST =                    \
186         $(glade_DATA)
187
188 CLEANFILES =                            \
189         $(BUILT_SOURCES)                \
190         stamp-empathy-gtk-enum-types.h