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