]> git.0d.be Git - empathy.git/blob - libempathy/Makefile.am
Unref contact returned by empathy_contact_list_get_members
[empathy.git] / libempathy / Makefile.am
1 include $(top_srcdir)/tools/flymake.mk
2
3 AM_CPPFLAGS =                                           \
4         $(ERROR_CFLAGS)                                 \
5         -I.                                             \
6         -I$(top_srcdir)                                 \
7         -I$(top_builddir)                               \
8         -DDATADIR=\""$(datadir)"\"                      \
9         -DLOCALEDIR=\""$(datadir)/locale"\"             \
10         -DG_LOG_DOMAIN=\"empathy\"                      \
11         $(TPL_CFLAGS)                                   \
12         $(LIBEMPATHY_CFLAGS)                            \
13         $(FAVOURITE_CONTACTS_CFLAGS)                    \
14         $(GEOCLUE_CFLAGS)                               \
15         $(NETWORK_MANAGER_CFLAGS)                       \
16         $(CONNMAN_CFLAGS)                               \
17         $(WARN_CFLAGS)                                  \
18         $(DISABLE_DEPRECATED)
19
20 BUILT_SOURCES =                                         \
21         empathy-marshal.h                               \
22         empathy-marshal.c                               \
23         empathy-marshal.list                            \
24         empathy-enum-types.h                            \
25         empathy-enum-types.c
26
27 noinst_LTLIBRARIES = libempathy.la
28
29 libempathy_headers =                            \
30         empathy-account-settings.h              \
31         empathy-call-factory.h                  \
32         empathy-call-handler.h                  \
33         empathy-chatroom-manager.h              \
34         empathy-chatroom.h                      \
35         empathy-connection-managers.h           \
36         empathy-connectivity.h                  \
37         empathy-contact-groups.h                \
38         empathy-contact-list.h                  \
39         empathy-contact-manager.h               \
40         empathy-contact-monitor.h               \
41         empathy-contact.h                       \
42         empathy-debug.h                         \
43         empathy-dispatch-operation.h            \
44         empathy-dispatcher.h                    \
45         empathy-ft-factory.h                    \
46         empathy-ft-handler.h                    \
47         empathy-handler.h                       \
48         empathy-idle.h                          \
49         empathy-irc-network-manager.h           \
50         empathy-irc-network.h                   \
51         empathy-irc-server.h                    \
52         empathy-location.h                      \
53         empathy-message.h                       \
54         empathy-status-presets.h                \
55         empathy-time.h                          \
56         empathy-tp-call.h                       \
57         empathy-tp-chat.h                       \
58         empathy-tp-contact-factory.h            \
59         empathy-tp-contact-list.h               \
60         empathy-tp-file.h                       \
61         empathy-tp-roomlist.h                   \
62         empathy-types.h                         \
63         empathy-utils.h
64
65 if !ENABLE_TPL
66 libempathy_headers +=   \
67         empathy-log-manager.h                           \
68         empathy-log-store-empathy.h                     \
69         empathy-log-store.h                             \
70         $(NULL)
71 endif
72
73 libempathy_la_SOURCES =                                 \
74         $(libempathy_headers)                           \
75         empathy-account-settings.c                      \
76         empathy-call-factory.c                          \
77         empathy-call-handler.c                          \
78         empathy-chatroom-manager.c                      \
79         empathy-chatroom.c                              \
80         empathy-connection-managers.c                   \
81         empathy-connectivity.c                          \
82         empathy-contact-groups.c                        \
83         empathy-contact-list.c                          \
84         empathy-contact-manager.c                       \
85         empathy-contact-monitor.c                       \
86         empathy-contact.c                               \
87         empathy-debug.c                                 \
88         empathy-dispatch-operation.c                    \
89         empathy-dispatcher.c                            \
90         empathy-ft-factory.c                            \
91         empathy-ft-handler.c                            \
92         empathy-handler.c                               \
93         empathy-idle.c                                  \
94         empathy-irc-network-manager.c                   \
95         empathy-irc-network.c                           \
96         empathy-irc-server.c                            \
97         empathy-message.c                               \
98         empathy-status-presets.c                        \
99         empathy-time.c                                  \
100         empathy-tp-call.c                               \
101         empathy-tp-chat.c                               \
102         empathy-tp-contact-factory.c                    \
103         empathy-tp-contact-list.c                       \
104         empathy-tp-file.c                               \
105         empathy-tp-roomlist.c                           \
106         empathy-utils.c
107
108 if !ENABLE_TPL
109 libempathy_la_SOURCES += \
110         empathy-log-manager.c                           \
111         empathy-log-store-empathy.c                     \
112         empathy-log-store.c                             \
113         $(NULL)
114 endif
115
116 # do not distribute generated files
117 nodist_libempathy_la_SOURCES =\
118         $(BUILT_SOURCES)
119
120 libempathy_la_LIBADD =          \
121         $(top_builddir)/extensions/libemp-extensions.la \
122         $(LIBEMPATHY_LIBS) \
123         $(FAVOURITE_CONTACTS_LIBS) \
124         $(GEOCLUE_LIBS) \
125         $(TPL_LIBS) \
126         $(NETWORK_MANAGER_LIBS) \
127         $(CONNMAN_LIBS)
128
129 check_c_sources = \
130     $(libempathy_la_SOURCES) \
131     $(libempathy_headers)
132 include $(top_srcdir)/tools/check-coding-style.mk
133 check-local: check-coding-style
134
135 empathy-marshal.list: $(libempathy_la_SOURCES) Makefile.am
136         $(AM_V_GEN)( cd $(srcdir) && \
137         sed -n -e 's/.*empathy_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
138         $(libempathy_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         $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=_$(subst -,_,$*)_marshal $< > $*-marshal.h
148
149 %-marshal.c: %-marshal.list Makefile
150         $(AM_V_GEN)echo "#include \"empathy-marshal.h\"" > $@ && \
151         $(GLIB_GENMARSHAL) --body --prefix=_$(subst -,_,$*)_marshal $< >> $*-marshal.c
152
153 empathy-enum-types.h: stamp-empathy-enum-types.h
154         $(AM_V_GEN)true
155 stamp-empathy-enum-types.h: $(libempathy_headers) Makefile
156         $(AM_V_GEN)(cd $(srcdir) \
157         && glib-mkenums \
158                         --fhead "#ifndef __LIBEMPATHY_ENUM_TYPES_H__\n" \
159                         --fhead "#define __LIBEMPATHY_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_ENUM_TYPES_H__ */\n" \
164                         --fprod "#include <libempathy/@filename@>\n" \
165                         --eprod "#define EMPATHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
166                         --eprod "GType @enum_name@_get_type (void);\n" \
167                 $(libempathy_headers) ) > xgen-gth \
168         && (cmp -s xgen-gth empathy-enum-type.h || cp xgen-gth empathy-enum-types.h) \
169         && rm -f xgen-gth \
170         && echo timestamp > $(@F)
171
172 empathy-enum-types.c: $(libempathy_headers) Makefile
173         $(AM_V_GEN)(cd $(srcdir) \
174         && glib-mkenums \
175                         --fhead "#include <config.h>\n" \
176                         --fhead "#include <glib-object.h>\n" \
177                         --fhead "#include \"empathy-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_headers) ) > xgen-gtc \
188         && cp xgen-gtc $(@F) \
189         && rm -f xgen-gtc
190
191 dtddir = $(datadir)/empathy
192 dtd_DATA =                                      \
193         empathy-status-presets.dtd              \
194         empathy-contact-groups.dtd              \
195         empathy-chatroom-manager.dtd            \
196         empathy-irc-networks.dtd
197
198 if !ENABLE_TPL
199 stylesheetdir = $(datadir)/empathy
200 stylesheet_DATA = empathy-log-manager.xsl
201 endif
202
203 ircnetworksdir = $(datadir)/empathy
204 ircnetworks_DATA =              \
205         irc-networks.xml
206
207 EXTRA_DIST =                    \
208         empathy-marshal.list    \
209         $(dtd_DATA)             \
210         $(ircnetworks_DATA)
211
212 if !ENABLE_TPL
213 EXTRA_DIST +=  $(stylesheet_DATA)
214 endif
215
216 CLEANFILES =                            \
217         $(BUILT_SOURCES)                \
218         stamp-empathy-enum-types.h