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