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