]> git.0d.be Git - empathy.git/blob - libempathy/Makefile.am
Merge branch 'debug-window'
[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-idle.c                                  \
49         empathy-irc-network.c                           \
50         empathy-irc-network-manager.c                   \
51         empathy-irc-server.c                            \
52         empathy-log-manager.c                           \
53         empathy-log-store.c                             \
54         empathy-log-store-empathy.c                     \
55         empathy-message.c                               \
56         empathy-status-presets.c                        \
57         empathy-time.c                                  \
58         empathy-tp-call.c                               \
59         empathy-tp-chat.c                               \
60         empathy-tp-contact-factory.c                    \
61         empathy-tp-contact-list.c                       \
62         empathy-tp-file.c                               \
63         empathy-tp-roomlist.c                           \
64         empathy-tube-handler.c                          \
65         empathy-utils.c
66
67 # do not distribute generated files
68 nodist_libempathy_la_SOURCES =\
69         $(BUILT_SOURCES)
70
71 libempathy_la_LIBADD =          \
72         $(top_builddir)/extensions/libemp-extensions.la \
73         $(LIBEMPATHY_LIBS) \
74         $(GEOCLUE_LIBS) \
75         $(NETWORK_MANAGER_LIBS) \
76         $(CONNMAN_LIBS)
77
78 libempathy_la_LDFLAGS =         \
79        -version-info ${LIBEMPATHY_CURRENT}:${LIBEMPATHY_REVISION}:${LIBEMPATHY_AGE} \
80        -export-symbols-regex ^empathy_
81
82 libempathy_headers =                            \
83         empathy-account-settings.h              \
84         empathy-account.h                       \
85         empathy-account-manager.h               \
86         empathy-chatroom.h                      \
87         empathy-chatroom-manager.h              \
88         empathy-call-factory.h                  \
89         empathy-call-handler.h                  \
90         empathy-connectivity.h                  \
91         empathy-contact.h                       \
92         empathy-contact-groups.h                \
93         empathy-contact-list.h                  \
94         empathy-contact-manager.h               \
95         empathy-contact-monitor.h               \
96         empathy-connection-managers.h           \
97         empathy-debug.h                         \
98         empathy-debugger.h                      \
99         empathy-dispatcher.h                    \
100         empathy-dispatch-operation.h            \
101         empathy-ft-factory.h                    \
102         empathy-ft-handler.h                    \
103         empathy-idle.h                          \
104         empathy-irc-network.h                   \
105         empathy-irc-network-manager.h           \
106         empathy-irc-server.h                    \
107         empathy-location.h                      \
108         empathy-log-manager.h                   \
109         empathy-log-store.h                     \
110         empathy-log-store-empathy.h             \
111         empathy-message.h                       \
112         empathy-status-presets.h                \
113         empathy-time.h                          \
114         empathy-tp-call.h                       \
115         empathy-tp-chat.h                       \
116         empathy-tp-contact-factory.h            \
117         empathy-tp-contact-list.h               \
118         empathy-tp-file.h                       \
119         empathy-tp-roomlist.h                   \
120         empathy-tube-handler.h                  \
121         empathy-types.h                         \
122         empathy-utils.h
123
124 check_c_sources = \
125     $(libempathy_la_SOURCES) \
126     $(libempathy_headers)
127 include $(top_srcdir)/tools/check-coding-style.mk
128 check-local: check-coding-style
129
130 libempathy_includedir = $(includedir)/libempathy/
131 libempathy_include_HEADERS =                    \
132         $(libempathy_headers)                   \
133         empathy-enum-types.h
134
135 empathy-marshal.list: $(libempathy_la_SOURCES) Makefile.am
136         $(QUIET_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         $(QUIET_GEN)$(GLIB_GENMARSHAL) --header --prefix=_$(subst -,_,$*)_marshal $< > $*-marshal.h
148
149 %-marshal.c: %-marshal.list Makefile
150         $(QUIET_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         $(QUIET_GEN)true
155 stamp-empathy-enum-types.h: $(libempathy_headers) Makefile
156         $(QUIET_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         $(QUIET_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 stylesheetdir = $(datadir)/empathy
199 stylesheet_DATA =               \
200         empathy-log-manager.xsl
201
202 ircnetworksdir = $(datadir)/empathy
203 ircnetworks_DATA =              \
204         irc-networks.xml
205
206 pkgconfigdir = $(libdir)/pkgconfig
207 pkgconfig_DATA = libempathy.pc
208
209 EXTRA_DIST =                    \
210         empathy-marshal.list    \
211         $(stylesheet_DATA)      \
212         $(dtd_DATA)             \
213         $(ircnetworks_DATA)
214
215 CLEANFILES =                            \
216         $(BUILT_SOURCES)                \
217         stamp-empathy-enum-types.h