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