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