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