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