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