]> git.0d.be Git - empathy.git/blob - libempathy/Makefile.am
Unify EmpathyTpChatroom and EmpathyTpChat.
[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         empathy-filter-glue.h                           \
16         empathy-chandler-glue.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-roomlist.c                           \
39         empathy-tp-call.c                               \
40         empathy-chandler.c                              \
41         empathy-filter.c                                \
42         empathy-idle.c                                  \
43         empathy-log-manager.c                           \
44         empathy-irc-network-manager.c                   \
45         empathy-irc-network.c                           \
46         empathy-irc-server.c
47
48 # do not distribute generated files
49 nodist_libempathy_la_SOURCES =\
50         $(BUILT_SOURCES)
51
52 libempathy_la_LIBADD =          \
53         $(top_builddir)/extensions/libemp-extensions.la \
54         $(LIBEMPATHY_LIBS)
55
56 libempathy_la_LDFLAGS =         \
57        -version-info ${LIBEMPATHY_CURRENT}:${LIBEMPATHY_REVISION}:${LIBEMPATHY_AGE} \
58        -export-symbols-regex ^empathy_
59
60 libempathy_headers =                            \
61         empathy-avatar.h                        \
62         empathy-time.h                          \
63         empathy-status-presets.h                \
64         empathy-debug.h                         \
65         empathy-utils.h                         \
66         empathy-message.h                       \
67         empathy-chatroom-manager.h              \
68         empathy-chatroom.h                      \
69         empathy-contact.h                       \
70         empathy-contact-groups.h                \
71         empathy-contact-list.h                  \
72         empathy-contact-manager.h               \
73         empathy-contact-factory.h               \
74         empathy-tp-contact-factory.h            \
75         empathy-tp-group.h                      \
76         empathy-tp-contact-list.h               \
77         empathy-tp-chat.h                       \
78         empathy-tp-roomlist.h                   \
79         empathy-tp-call.h                       \
80         empathy-chandler.h                      \
81         empathy-filter.h                        \
82         empathy-idle.h                          \
83         empathy-log-manager.h                   \
84         empathy-irc-network-manager.h           \
85         empathy-irc-network.h                   \
86         empathy-irc-server.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-chandler-glue.h: empathy-chandler.xml Makefile
112         $(LIBTOOL) --mode=execute $(DBUS_BINDING_TOOL) --prefix=empathy_chandler --mode=glib-server --output=$@ $<
113 empathy-filter-glue.h: empathy-filter.xml Makefile
114         $(LIBTOOL) --mode=execute $(DBUS_BINDING_TOOL) --prefix=empathy_filter --mode=glib-server --output=$@ $<
115
116
117 empathy-enum-types.h: stamp-empathy-enum-types.h
118         @true
119 stamp-empathy-enum-types.h: $(libempathy_headers) Makefile
120         (cd $(srcdir) \
121         && glib-mkenums \
122                         --fhead "#ifndef __LIBEMPATHY_ENUM_TYPES_H__\n" \
123                         --fhead "#define __LIBEMPATHY_ENUM_TYPES_H__ 1\n\n" \
124                         --fhead "#include <glib-object.h>\n\n" \
125                         --fhead "G_BEGIN_DECLS\n\n" \
126                         --ftail "G_END_DECLS\n\n" \
127                         --ftail "#endif /* __LIBEMPATHY_ENUM_TYPES_H__ */\n" \
128                         --fprod "#include <libempathy/@filename@>\n" \
129                         --eprod "#define EMPATHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
130                         --eprod "GType @enum_name@_get_type (void);\n" \
131                 $(libempathy_headers) ) > xgen-gth \
132         && (cmp -s xgen-gth empathy-enum-type.h || cp xgen-gth empathy-enum-types.h) \
133         && rm -f xgen-gth \
134         && echo timestamp > $(@F)
135
136 empathy-enum-types.c: $(libempathy_headers) Makefile
137         (cd $(srcdir) \
138         && glib-mkenums \
139                         --fhead "#include <config.h>\n" \
140                         --fhead "#include <glib-object.h>\n" \
141                         --fhead "#include \"empathy-enum-types.h\"\n\n" \
142                         --fprod "\n/* enumerations from \"@filename@\" */" \
143                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
144                         --vprod "  { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
145                         --vtail "  { 0, NULL, NULL }\n};\n\n" \
146                         --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
147                         --vtail "  static GType type = 0;\n\n" \
148                         --vtail "  if (!type)\n" \
149                         --vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
150                         --vtail "  return type;\n}\n\n" \
151                 $(libempathy_headers) ) > xgen-gtc \
152         && cp xgen-gtc $(@F) \
153         && rm -f xgen-gtc
154
155 dtddir = $(datadir)/empathy
156 dtd_DATA =                                      \
157         empathy-status-presets.dtd              \
158         empathy-contact-groups.dtd              \
159         empathy-chatroom-manager.dtd            \
160         empathy-irc-networks.dtd
161
162 stylesheetdir = $(datadir)/empathy
163 stylesheet_DATA =               \
164         empathy-log-manager.xsl
165
166 ircnetworksdir = $(datadir)/empathy
167 ircnetworks_DATA =              \
168         irc-networks.xml
169
170 pkgconfigdir = $(libdir)/pkgconfig
171 pkgconfig_DATA = libempathy.pc
172
173 EXTRA_DIST =                    \
174         empathy-marshal.list    \
175         empathy-chandler.xml    \
176         empathy-filter.xml      \
177         $(stylesheet_DATA)      \
178         $(dtd_DATA)             \
179         $(ircnetworks_DATA)
180
181 CLEANFILES =                            \
182         $(BUILT_SOURCES)                \
183         stamp-empathy-enum-types.h