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