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