]> git.0d.be Git - empathy.git/blob - libempathy/Makefile.am
Add a simple abstraction for implementing handlers
[empathy.git] / libempathy / Makefile.am
1 include $(top_srcdir)/tools/shave.mk
2 include $(top_srcdir)/tools/flymake.mk
3
4 AM_CPPFLAGS =                                           \
5         -I.                                             \
6         -I$(top_srcdir)                                 \
7         -I$(top_builddir)                               \
8         -DDATADIR=\""$(datadir)"\"                      \
9         -DLOCALEDIR=\""$(datadir)/locale"\"             \
10         -DG_LOG_DOMAIN=\"empathy\"                      \
11         $(LIBEMPATHY_CFLAGS)                            \
12         $(GEOCLUE_CFLAGS)                               \
13         $(NETWORK_MANAGER_CFLAGS)                       \
14         $(CONNMAN_CFLAGS)                               \
15         $(WARN_CFLAGS)                                  \
16         $(DISABLE_DEPRECATED)
17
18 BUILT_SOURCES =                                         \
19         empathy-marshal.h                               \
20         empathy-marshal.c                               \
21         empathy-marshal.list                            \
22         empathy-enum-types.h                            \
23         empathy-enum-types.c
24
25 lib_LTLIBRARIES = libempathy.la
26
27 libempathy_la_SOURCES =                                 \
28         empathy-account.c                       \
29         empathy-account-settings.c                      \
30         empathy-account-manager.c                       \
31         empathy-chatroom.c                              \
32         empathy-chatroom-manager.c                      \
33         empathy-call-factory.c                          \
34         empathy-call-handler.c                          \
35         empathy-connectivity.c                          \
36         empathy-contact.c                               \
37         empathy-contact-groups.c                        \
38         empathy-contact-list.c                          \
39         empathy-contact-manager.c                       \
40         empathy-contact-monitor.c                       \
41         empathy-connection-managers.c                   \
42         empathy-debug.c                                 \
43         empathy-debugger.c                              \
44         empathy-dispatcher.c                            \
45         empathy-dispatch-operation.c                    \
46         empathy-ft-factory.c                            \
47         empathy-ft-handler.c                            \
48         empathy-handler.c                               \
49         empathy-idle.c                                  \
50         empathy-irc-network.c                           \
51         empathy-irc-network-manager.c                   \
52         empathy-irc-server.c                            \
53         empathy-log-manager.c                           \
54         empathy-log-store.c                             \
55         empathy-log-store-empathy.c                     \
56         empathy-message.c                               \
57         empathy-status-presets.c                        \
58         empathy-time.c                                  \
59         empathy-tp-call.c                               \
60         empathy-tp-chat.c                               \
61         empathy-tp-contact-factory.c                    \
62         empathy-tp-contact-list.c                       \
63         empathy-tp-file.c                               \
64         empathy-tp-roomlist.c                           \
65         empathy-tube-handler.c                          \
66         empathy-utils.c
67
68 # do not distribute generated files
69 nodist_libempathy_la_SOURCES =\
70         $(BUILT_SOURCES)
71
72 libempathy_la_LIBADD =          \
73         $(top_builddir)/extensions/libemp-extensions.la \
74         $(LIBEMPATHY_LIBS) \
75         $(GEOCLUE_LIBS) \
76         $(NETWORK_MANAGER_LIBS) \
77         $(CONNMAN_LIBS)
78
79 libempathy_la_LDFLAGS =         \
80        -version-info ${LIBEMPATHY_CURRENT}:${LIBEMPATHY_REVISION}:${LIBEMPATHY_AGE} \
81        -export-symbols-regex ^empathy_
82
83 libempathy_headers =                            \
84         empathy-account-settings.h              \
85         empathy-account.h                       \
86         empathy-account-manager.h               \
87         empathy-chatroom.h                      \
88         empathy-chatroom-manager.h              \
89         empathy-call-factory.h                  \
90         empathy-call-handler.h                  \
91         empathy-connectivity.h                  \
92         empathy-contact.h                       \
93         empathy-contact-groups.h                \
94         empathy-contact-list.h                  \
95         empathy-contact-manager.h               \
96         empathy-contact-monitor.h               \
97         empathy-connection-managers.h           \
98         empathy-debug.h                         \
99         empathy-debugger.h                      \
100         empathy-dispatcher.h                    \
101         empathy-dispatch-operation.h            \
102         empathy-ft-factory.h                    \
103         empathy-ft-handler.h                    \
104         empathy-handler.h                       \
105         empathy-idle.h                          \
106         empathy-irc-network.h                   \
107         empathy-irc-network-manager.h           \
108         empathy-irc-server.h                    \
109         empathy-location.h                      \
110         empathy-log-manager.h                   \
111         empathy-log-store.h                     \
112         empathy-log-store-empathy.h             \
113         empathy-message.h                       \
114         empathy-status-presets.h                \
115         empathy-time.h                          \
116         empathy-tp-call.h                       \
117         empathy-tp-chat.h                       \
118         empathy-tp-contact-factory.h            \
119         empathy-tp-contact-list.h               \
120         empathy-tp-file.h                       \
121         empathy-tp-roomlist.h                   \
122         empathy-tube-handler.h                  \
123         empathy-types.h                         \
124         empathy-utils.h
125
126 check_c_sources = \
127     $(libempathy_la_SOURCES) \
128     $(libempathy_headers)
129 include $(top_srcdir)/tools/check-coding-style.mk
130 check-local: check-coding-style
131
132 libempathy_includedir = $(includedir)/libempathy/
133 libempathy_include_HEADERS =                    \
134         $(libempathy_headers)                   \
135         empathy-enum-types.h
136
137 empathy-marshal.list: $(libempathy_la_SOURCES) Makefile.am
138         $(QUIET_GEN)( cd $(srcdir) && \
139         sed -n -e 's/.*empathy_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
140         $(libempathy_la_SOURCES) ) \
141         | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
142         if cmp -s $@.tmp $@; then \
143                 rm $@.tmp; \
144         else \
145                 mv $@.tmp $@; \
146         fi
147
148 %-marshal.h: %-marshal.list Makefile
149         $(QUIET_GEN)$(GLIB_GENMARSHAL) --header --prefix=_$(subst -,_,$*)_marshal $< > $*-marshal.h
150
151 %-marshal.c: %-marshal.list Makefile
152         $(QUIET_GEN)echo "#include \"empathy-marshal.h\"" > $@ && \
153         $(GLIB_GENMARSHAL) --body --prefix=_$(subst -,_,$*)_marshal $< >> $*-marshal.c
154
155 empathy-enum-types.h: stamp-empathy-enum-types.h
156         $(QUIET_GEN)true
157 stamp-empathy-enum-types.h: $(libempathy_headers) Makefile
158         $(QUIET_GEN)(cd $(srcdir) \
159         && glib-mkenums \
160                         --fhead "#ifndef __LIBEMPATHY_ENUM_TYPES_H__\n" \
161                         --fhead "#define __LIBEMPATHY_ENUM_TYPES_H__ 1\n\n" \
162                         --fhead "#include <glib-object.h>\n\n" \
163                         --fhead "G_BEGIN_DECLS\n\n" \
164                         --ftail "G_END_DECLS\n\n" \
165                         --ftail "#endif /* __LIBEMPATHY_ENUM_TYPES_H__ */\n" \
166                         --fprod "#include <libempathy/@filename@>\n" \
167                         --eprod "#define EMPATHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
168                         --eprod "GType @enum_name@_get_type (void);\n" \
169                 $(libempathy_headers) ) > xgen-gth \
170         && (cmp -s xgen-gth empathy-enum-type.h || cp xgen-gth empathy-enum-types.h) \
171         && rm -f xgen-gth \
172         && echo timestamp > $(@F)
173
174 empathy-enum-types.c: $(libempathy_headers) Makefile
175         $(QUIET_GEN)(cd $(srcdir) \
176         && glib-mkenums \
177                         --fhead "#include <config.h>\n" \
178                         --fhead "#include <glib-object.h>\n" \
179                         --fhead "#include \"empathy-enum-types.h\"\n\n" \
180                         --fprod "\n/* enumerations from \"@filename@\" */" \
181                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
182                         --vprod "  { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
183                         --vtail "  { 0, NULL, NULL }\n};\n\n" \
184                         --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
185                         --vtail "  static GType type = 0;\n\n" \
186                         --vtail "  if (!type)\n" \
187                         --vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
188                         --vtail "  return type;\n}\n\n" \
189                 $(libempathy_headers) ) > xgen-gtc \
190         && cp xgen-gtc $(@F) \
191         && rm -f xgen-gtc
192
193 dtddir = $(datadir)/empathy
194 dtd_DATA =                                      \
195         empathy-status-presets.dtd              \
196         empathy-contact-groups.dtd              \
197         empathy-chatroom-manager.dtd            \
198         empathy-irc-networks.dtd
199
200 stylesheetdir = $(datadir)/empathy
201 stylesheet_DATA =               \
202         empathy-log-manager.xsl
203
204 ircnetworksdir = $(datadir)/empathy
205 ircnetworks_DATA =              \
206         irc-networks.xml
207
208 pkgconfigdir = $(libdir)/pkgconfig
209 pkgconfig_DATA = libempathy.pc
210
211 EXTRA_DIST =                    \
212         empathy-marshal.list    \
213         $(stylesheet_DATA)      \
214         $(dtd_DATA)             \
215         $(ircnetworks_DATA)
216
217 CLEANFILES =                            \
218         $(BUILT_SOURCES)                \
219         stamp-empathy-enum-types.h