]> git.0d.be Git - empathy.git/blob - libempathy/Makefile.am
check-whitespace.sh: check trailing tabs
[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         $(LIBEMPATHY_CFLAGS)                            \
11         $(GEOCLUE_CFLAGS)                               \
12         $(WARN_CFLAGS)                                  \
13         $(DISABLE_DEPRECATED)
14
15 BUILT_SOURCES =                                         \
16         empathy-marshal.h                               \
17         empathy-marshal.c                               \
18         empathy-marshal.list                            \
19         empathy-enum-types.h                            \
20         empathy-enum-types.c
21
22 lib_LTLIBRARIES = libempathy.la
23
24 libempathy_la_SOURCES =                                 \
25         empathy-account-manager.c                       \
26         empathy-chatroom.c                              \
27         empathy-chatroom-manager.c                      \
28         empathy-call-factory.c                          \
29         empathy-call-handler.c                          \
30         empathy-contact.c                               \
31         empathy-contact-groups.c                        \
32         empathy-contact-list.c                          \
33         empathy-contact-manager.c                       \
34         empathy-contact-monitor.c                       \
35         empathy-debug.c                                 \
36         empathy-dispatcher.c                            \
37         empathy-dispatch-operation.c                    \
38         empathy-ft-factory.c                            \
39         empathy-ft-handler.c                            \
40         empathy-idle.c                                  \
41         empathy-irc-network.c                           \
42         empathy-irc-network-manager.c                   \
43         empathy-irc-server.c                            \
44         empathy-log-manager.c                           \
45         empathy-log-store.c                             \
46         empathy-log-store-empathy.c                     \
47         empathy-message.c                               \
48         empathy-status-presets.c                        \
49         empathy-time.c                                  \
50         empathy-tp-call.c                               \
51         empathy-tp-chat.c                               \
52         empathy-tp-contact-factory.c                    \
53         empathy-tp-contact-list.c                       \
54         empathy-tp-file.c                               \
55         empathy-tp-roomlist.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-tube-handler.h                  \
106         empathy-types.h                         \
107         empathy-utils.h
108
109 check_c_sources = \
110     $(libempathy_la_SOURCES) \
111     $(libempathy_headers)
112 include $(top_srcdir)/tools/check-coding-style.mk
113 check-local: check-coding-style
114
115 libempathy_includedir = $(includedir)/libempathy/
116 libempathy_include_HEADERS =                    \
117         $(libempathy_headers)                   \
118         empathy-enum-types.h
119
120 empathy-marshal.list: $(libempathy_la_SOURCES) Makefile.am
121         $(QUIET_GEN)( cd $(srcdir) && \
122         sed -n -e 's/.*empathy_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
123         $(libempathy_la_SOURCES) ) \
124         | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
125         if cmp -s $@.tmp $@; then \
126                 rm $@.tmp; \
127         else \
128                 mv $@.tmp $@; \
129         fi
130
131 %-marshal.h: %-marshal.list Makefile
132         $(QUIET_GEN)$(GLIB_GENMARSHAL) --header --prefix=_$(subst -,_,$*)_marshal $< > $*-marshal.h
133
134 %-marshal.c: %-marshal.list Makefile
135         $(QUIET_GEN)echo "#include \"empathy-marshal.h\"" > $@ && \
136         $(GLIB_GENMARSHAL) --body --prefix=_$(subst -,_,$*)_marshal $< >> $*-marshal.c
137
138 empathy-enum-types.h: stamp-empathy-enum-types.h
139         $(QUIET_GEN)true
140 stamp-empathy-enum-types.h: $(libempathy_headers) Makefile
141         $(QUIET_GEN)(cd $(srcdir) \
142         && glib-mkenums \
143                         --fhead "#ifndef __LIBEMPATHY_ENUM_TYPES_H__\n" \
144                         --fhead "#define __LIBEMPATHY_ENUM_TYPES_H__ 1\n\n" \
145                         --fhead "#include <glib-object.h>\n\n" \
146                         --fhead "G_BEGIN_DECLS\n\n" \
147                         --ftail "G_END_DECLS\n\n" \
148                         --ftail "#endif /* __LIBEMPATHY_ENUM_TYPES_H__ */\n" \
149                         --fprod "#include <libempathy/@filename@>\n" \
150                         --eprod "#define EMPATHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
151                         --eprod "GType @enum_name@_get_type (void);\n" \
152                 $(libempathy_headers) ) > xgen-gth \
153         && (cmp -s xgen-gth empathy-enum-type.h || cp xgen-gth empathy-enum-types.h) \
154         && rm -f xgen-gth \
155         && echo timestamp > $(@F)
156
157 empathy-enum-types.c: $(libempathy_headers) Makefile
158         $(QUIET_GEN)(cd $(srcdir) \
159         && glib-mkenums \
160                         --fhead "#include <config.h>\n" \
161                         --fhead "#include <glib-object.h>\n" \
162                         --fhead "#include \"empathy-enum-types.h\"\n\n" \
163                         --fprod "\n/* enumerations from \"@filename@\" */" \
164                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
165                         --vprod "  { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
166                         --vtail "  { 0, NULL, NULL }\n};\n\n" \
167                         --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
168                         --vtail "  static GType type = 0;\n\n" \
169                         --vtail "  if (!type)\n" \
170                         --vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
171                         --vtail "  return type;\n}\n\n" \
172                 $(libempathy_headers) ) > xgen-gtc \
173         && cp xgen-gtc $(@F) \
174         && rm -f xgen-gtc
175
176 dtddir = $(datadir)/empathy
177 dtd_DATA =                                      \
178         empathy-status-presets.dtd              \
179         empathy-contact-groups.dtd              \
180         empathy-chatroom-manager.dtd            \
181         empathy-irc-networks.dtd
182
183 stylesheetdir = $(datadir)/empathy
184 stylesheet_DATA =               \
185         empathy-log-manager.xsl
186
187 ircnetworksdir = $(datadir)/empathy
188 ircnetworks_DATA =              \
189         irc-networks.xml
190
191 pkgconfigdir = $(libdir)/pkgconfig
192 pkgconfig_DATA = libempathy.pc
193
194 EXTRA_DIST =                    \
195         empathy-marshal.list    \
196         $(stylesheet_DATA)      \
197         $(dtd_DATA)             \
198         $(ircnetworks_DATA)
199
200 CLEANFILES =                            \
201         $(BUILT_SOURCES)                \
202         stamp-empathy-enum-types.h