]> git.0d.be Git - empathy.git/blob - libempathy/Makefile.am
Use TpDebugSender to publish debug messages (#607330)
[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         $(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 noinst_LTLIBRARIES = libempathy.la
26
27 libempathy_headers =                            \
28         empathy-account-settings.h              \
29         empathy-call-factory.h                  \
30         empathy-call-handler.h                  \
31         empathy-chatroom-manager.h              \
32         empathy-chatroom.h                      \
33         empathy-connection-managers.h           \
34         empathy-connectivity.h                  \
35         empathy-contact-groups.h                \
36         empathy-contact-list.h                  \
37         empathy-contact-manager.h               \
38         empathy-contact-monitor.h               \
39         empathy-contact.h                       \
40         empathy-debug.h                         \
41         empathy-dispatch-operation.h            \
42         empathy-dispatcher.h                    \
43         empathy-ft-factory.h                    \
44         empathy-ft-handler.h                    \
45         empathy-handler.h                       \
46         empathy-idle.h                          \
47         empathy-irc-network-manager.h           \
48         empathy-irc-network.h                   \
49         empathy-irc-server.h                    \
50         empathy-location.h                      \
51         empathy-log-manager.h                   \
52         empathy-log-store-empathy.h             \
53         empathy-log-store.h                     \
54         empathy-message.h                       \
55         empathy-status-presets.h                \
56         empathy-time.h                          \
57         empathy-tp-call.h                       \
58         empathy-tp-chat.h                       \
59         empathy-tp-contact-factory.h            \
60         empathy-tp-contact-list.h               \
61         empathy-tp-file.h                       \
62         empathy-tp-roomlist.h                   \
63         empathy-types.h                         \
64         empathy-utils.h
65
66 libempathy_la_SOURCES =                                 \
67         $(libempathy_headers)                           \
68         empathy-account-settings.c                      \
69         empathy-call-factory.c                          \
70         empathy-call-handler.c                          \
71         empathy-chatroom-manager.c                      \
72         empathy-chatroom.c                              \
73         empathy-connection-managers.c                   \
74         empathy-connectivity.c                          \
75         empathy-contact-groups.c                        \
76         empathy-contact-list.c                          \
77         empathy-contact-manager.c                       \
78         empathy-contact-monitor.c                       \
79         empathy-contact.c                               \
80         empathy-debug.c                                 \
81         empathy-dispatch-operation.c                    \
82         empathy-dispatcher.c                            \
83         empathy-ft-factory.c                            \
84         empathy-ft-handler.c                            \
85         empathy-handler.c                               \
86         empathy-idle.c                                  \
87         empathy-irc-network-manager.c                   \
88         empathy-irc-network.c                           \
89         empathy-irc-server.c                            \
90         empathy-log-manager.c                           \
91         empathy-log-store-empathy.c                     \
92         empathy-log-store.c                             \
93         empathy-message.c                               \
94         empathy-status-presets.c                        \
95         empathy-time.c                                  \
96         empathy-tp-call.c                               \
97         empathy-tp-chat.c                               \
98         empathy-tp-contact-factory.c                    \
99         empathy-tp-contact-list.c                       \
100         empathy-tp-file.c                               \
101         empathy-tp-roomlist.c                           \
102         empathy-utils.c
103
104 # do not distribute generated files
105 nodist_libempathy_la_SOURCES =\
106         $(BUILT_SOURCES)
107
108 libempathy_la_LIBADD =          \
109         $(top_builddir)/extensions/libemp-extensions.la \
110         $(LIBEMPATHY_LIBS) \
111         $(GEOCLUE_LIBS) \
112         $(NETWORK_MANAGER_LIBS) \
113         $(CONNMAN_LIBS)
114
115 check_c_sources = \
116     $(libempathy_la_SOURCES) \
117     $(libempathy_headers)
118 include $(top_srcdir)/tools/check-coding-style.mk
119 check-local: check-coding-style
120
121 empathy-marshal.list: $(libempathy_la_SOURCES) Makefile.am
122         $(AM_V_GEN)( cd $(srcdir) && \
123         sed -n -e 's/.*empathy_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
124         $(libempathy_la_SOURCES) ) \
125         | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
126         @if cmp -s $@.tmp $@; then \
127                 rm $@.tmp; \
128         else \
129                 mv $@.tmp $@; \
130         fi
131
132 %-marshal.h: %-marshal.list Makefile
133         $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=_$(subst -,_,$*)_marshal $< > $*-marshal.h
134
135 %-marshal.c: %-marshal.list Makefile
136         $(AM_V_GEN)echo "#include \"empathy-marshal.h\"" > $@ && \
137         $(GLIB_GENMARSHAL) --body --prefix=_$(subst -,_,$*)_marshal $< >> $*-marshal.c
138
139 empathy-enum-types.h: stamp-empathy-enum-types.h
140         $(AM_V_GEN)true
141 stamp-empathy-enum-types.h: $(libempathy_headers) Makefile
142         $(AM_V_GEN)(cd $(srcdir) \
143         && glib-mkenums \
144                         --fhead "#ifndef __LIBEMPATHY_ENUM_TYPES_H__\n" \
145                         --fhead "#define __LIBEMPATHY_ENUM_TYPES_H__ 1\n\n" \
146                         --fhead "#include <glib-object.h>\n\n" \
147                         --fhead "G_BEGIN_DECLS\n\n" \
148                         --ftail "G_END_DECLS\n\n" \
149                         --ftail "#endif /* __LIBEMPATHY_ENUM_TYPES_H__ */\n" \
150                         --fprod "#include <libempathy/@filename@>\n" \
151                         --eprod "#define EMPATHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
152                         --eprod "GType @enum_name@_get_type (void);\n" \
153                 $(libempathy_headers) ) > xgen-gth \
154         && (cmp -s xgen-gth empathy-enum-type.h || cp xgen-gth empathy-enum-types.h) \
155         && rm -f xgen-gth \
156         && echo timestamp > $(@F)
157
158 empathy-enum-types.c: $(libempathy_headers) Makefile
159         $(AM_V_GEN)(cd $(srcdir) \
160         && glib-mkenums \
161                         --fhead "#include <config.h>\n" \
162                         --fhead "#include <glib-object.h>\n" \
163                         --fhead "#include \"empathy-enum-types.h\"\n\n" \
164                         --fprod "\n/* enumerations from \"@filename@\" */" \
165                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
166                         --vprod "  { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
167                         --vtail "  { 0, NULL, NULL }\n};\n\n" \
168                         --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
169                         --vtail "  static GType type = 0;\n\n" \
170                         --vtail "  if (!type)\n" \
171                         --vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
172                         --vtail "  return type;\n}\n\n" \
173                 $(libempathy_headers) ) > xgen-gtc \
174         && cp xgen-gtc $(@F) \
175         && rm -f xgen-gtc
176
177 dtddir = $(datadir)/empathy
178 dtd_DATA =                                      \
179         empathy-status-presets.dtd              \
180         empathy-contact-groups.dtd              \
181         empathy-chatroom-manager.dtd            \
182         empathy-irc-networks.dtd
183
184 stylesheetdir = $(datadir)/empathy
185 stylesheet_DATA =               \
186         empathy-log-manager.xsl
187
188 ircnetworksdir = $(datadir)/empathy
189 ircnetworks_DATA =              \
190         irc-networks.xml
191
192 EXTRA_DIST =                    \
193         empathy-marshal.list    \
194         $(stylesheet_DATA)      \
195         $(dtd_DATA)             \
196         $(ircnetworks_DATA)
197
198 CLEANFILES =                            \
199         $(BUILT_SOURCES)                \
200         stamp-empathy-enum-types.h