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