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