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