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