]> git.0d.be Git - empathy.git/blob - libempathy/Makefile.am
Move avatar cache to ~/.cache and don't mix avatar from different contacts, tokens...
[empathy.git] / libempathy / Makefile.am
1 AM_CPPFLAGS =                                           \
2         -I.                                             \
3         -I$(top_srcdir)                                 \
4         -I$(top_builddir)                               \
5         -DDATADIR=\""$(datadir)"\"                      \
6         $(LIBEMPATHY_CFLAGS)                            \
7         $(WARN_CFLAGS)
8
9 BUILT_SOURCES =                                         \
10         empathy-marshal.h                               \
11         empathy-marshal.c                               \
12         empathy-marshal.list                            \
13         empathy-enum-types.h                            \
14         empathy-enum-types.c
15
16 lib_LTLIBRARIES = libempathy.la
17
18 libempathy_la_SOURCES =                                 \
19         empathy-time.c                                  \
20         empathy-status-presets.c                        \
21         empathy-debug.c                                 \
22         empathy-utils.c                                 \
23         empathy-message.c                               \
24         empathy-chatroom-manager.c                      \
25         empathy-chatroom.c                              \
26         empathy-contact.c                               \
27         empathy-contact-groups.c                        \
28         empathy-contact-list.c                          \
29         empathy-contact-manager.c                       \
30         empathy-contact-factory.c                       \
31         empathy-tp-contact-factory.c                    \
32         empathy-tp-group.c                              \
33         empathy-tp-contact-list.c                       \
34         empathy-tp-chat.c                               \
35         empathy-tp-roomlist.c                           \
36         empathy-tp-call.c                               \
37         empathy-tp-tube.c                               \
38         empathy-idle.c                                  \
39         empathy-log-manager.c                           \
40         empathy-irc-network-manager.c                   \
41         empathy-irc-network.c                           \
42         empathy-irc-server.c                            \
43         empathy-tube-handler.c                          \
44         empathy-dispatcher.c
45
46 # do not distribute generated files
47 nodist_libempathy_la_SOURCES =\
48         $(BUILT_SOURCES)
49
50 libempathy_la_LIBADD =          \
51         $(top_builddir)/extensions/libemp-extensions.la \
52         $(LIBEMPATHY_LIBS)
53
54 libempathy_la_LDFLAGS =         \
55        -version-info ${LIBEMPATHY_CURRENT}:${LIBEMPATHY_REVISION}:${LIBEMPATHY_AGE} \
56        -export-symbols-regex ^empathy_
57
58 libempathy_headers =                            \
59         empathy-time.h                          \
60         empathy-status-presets.h                \
61         empathy-debug.h                         \
62         empathy-utils.h                         \
63         empathy-message.h                       \
64         empathy-chatroom-manager.h              \
65         empathy-chatroom.h                      \
66         empathy-contact.h                       \
67         empathy-contact-groups.h                \
68         empathy-contact-list.h                  \
69         empathy-contact-manager.h               \
70         empathy-contact-factory.h               \
71         empathy-tp-contact-factory.h            \
72         empathy-tp-group.h                      \
73         empathy-tp-contact-list.h               \
74         empathy-tp-chat.h                       \
75         empathy-tp-roomlist.h                   \
76         empathy-tp-call.h                       \
77         empathy-tp-tube.h                       \
78         empathy-idle.h                          \
79         empathy-log-manager.h                   \
80         empathy-irc-network-manager.h           \
81         empathy-irc-network.h                   \
82         empathy-irc-server.h                    \
83         empathy-tube-handler.h                  \
84         empathy-dispatcher.h
85
86 libempathy_includedir = $(includedir)/libempathy/
87 libempathy_include_HEADERS =                    \
88         $(libempathy_headers)                   \
89         empathy-enum-types.h
90
91 empathy-marshal.list: $(libempathy_la_SOURCES) Makefile.am
92         ( cd $(srcdir) && \
93         sed -n -e 's/.*empathy_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
94         $(libempathy_la_SOURCES) ) \
95         | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
96         if cmp -s $@.tmp $@; then \
97                 rm $@.tmp; \
98         else \
99                 mv $@.tmp $@; \
100         fi
101
102 %-marshal.h: %-marshal.list Makefile
103         $(GLIB_GENMARSHAL) --header --prefix=_$(subst -,_,$*)_marshal $< > $*-marshal.h
104
105 %-marshal.c: %-marshal.list Makefile
106         echo "#include \"empathy-marshal.h\"" > $@ && \
107         $(GLIB_GENMARSHAL) --body --prefix=_$(subst -,_,$*)_marshal $< >> $*-marshal.c
108
109 empathy-enum-types.h: stamp-empathy-enum-types.h
110         @true
111 stamp-empathy-enum-types.h: $(libempathy_headers) Makefile
112         (cd $(srcdir) \
113         && glib-mkenums \
114                         --fhead "#ifndef __LIBEMPATHY_ENUM_TYPES_H__\n" \
115                         --fhead "#define __LIBEMPATHY_ENUM_TYPES_H__ 1\n\n" \
116                         --fhead "#include <glib-object.h>\n\n" \
117                         --fhead "G_BEGIN_DECLS\n\n" \
118                         --ftail "G_END_DECLS\n\n" \
119                         --ftail "#endif /* __LIBEMPATHY_ENUM_TYPES_H__ */\n" \
120                         --fprod "#include <libempathy/@filename@>\n" \
121                         --eprod "#define EMPATHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
122                         --eprod "GType @enum_name@_get_type (void);\n" \
123                 $(libempathy_headers) ) > xgen-gth \
124         && (cmp -s xgen-gth empathy-enum-type.h || cp xgen-gth empathy-enum-types.h) \
125         && rm -f xgen-gth \
126         && echo timestamp > $(@F)
127
128 empathy-enum-types.c: $(libempathy_headers) Makefile
129         (cd $(srcdir) \
130         && glib-mkenums \
131                         --fhead "#include <config.h>\n" \
132                         --fhead "#include <glib-object.h>\n" \
133                         --fhead "#include \"empathy-enum-types.h\"\n\n" \
134                         --fprod "\n/* enumerations from \"@filename@\" */" \
135                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
136                         --vprod "  { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
137                         --vtail "  { 0, NULL, NULL }\n};\n\n" \
138                         --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
139                         --vtail "  static GType type = 0;\n\n" \
140                         --vtail "  if (!type)\n" \
141                         --vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
142                         --vtail "  return type;\n}\n\n" \
143                 $(libempathy_headers) ) > xgen-gtc \
144         && cp xgen-gtc $(@F) \
145         && rm -f xgen-gtc
146
147 dtddir = $(datadir)/empathy
148 dtd_DATA =                                      \
149         empathy-status-presets.dtd              \
150         empathy-contact-groups.dtd              \
151         empathy-chatroom-manager.dtd            \
152         empathy-irc-networks.dtd
153
154 stylesheetdir = $(datadir)/empathy
155 stylesheet_DATA =               \
156         empathy-log-manager.xsl
157
158 ircnetworksdir = $(datadir)/empathy
159 ircnetworks_DATA =              \
160         irc-networks.xml
161
162 pkgconfigdir = $(libdir)/pkgconfig
163 pkgconfig_DATA = libempathy.pc
164
165 EXTRA_DIST =                    \
166         empathy-marshal.list    \
167         $(stylesheet_DATA)      \
168         $(dtd_DATA)             \
169         $(ircnetworks_DATA)
170
171 CLEANFILES =                            \
172         $(BUILT_SOURCES)                \
173         stamp-empathy-enum-types.h