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