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