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