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