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