]> git.0d.be Git - empathy.git/blob - libempathy/Makefile.am
Merge branch 'new-log-window'
[empathy.git] / libempathy / Makefile.am
1 include $(top_srcdir)/tools/flymake.mk
2
3 AM_CPPFLAGS =                                           \
4         $(ERROR_CFLAGS)                                 \
5         -I.                                             \
6         -I$(top_srcdir)                                 \
7         -I$(top_builddir)                               \
8         -DDATADIR=\""$(datadir)"\"                      \
9         -DLOCALEDIR=\""$(datadir)/locale"\"             \
10         -DG_LOG_DOMAIN=\"empathy\"                      \
11         -DGCR_API_SUBJECT_TO_CHANGE                     \
12         $(EMPATHY_CFLAGS)                               \
13         $(YELL_CFLAGS)                                  \
14         $(GEOCLUE_CFLAGS)                               \
15         $(GEOCODE_CFLAGS)                               \
16         $(NETWORK_MANAGER_CFLAGS)                       \
17         $(CONNMAN_CFLAGS)                               \
18         $(WARN_CFLAGS)                                  \
19         $(DISABLE_DEPRECATED)
20
21 BUILT_SOURCES =                                         \
22         empathy-marshal.h                               \
23         empathy-marshal.c                               \
24         empathy-marshal.list                            \
25         empathy-enum-types.h                            \
26         empathy-enum-types.c
27
28 noinst_LTLIBRARIES = libempathy.la
29
30 libempathy_headers =                            \
31         action-chain-internal.h                 \
32         empathy-account-settings.h              \
33         empathy-auth-factory.h                  \
34         empathy-channel-factory.h \
35         empathy-chatroom-manager.h              \
36         empathy-chatroom.h                      \
37         empathy-connection-managers.h           \
38         empathy-connectivity.h                  \
39         empathy-contact-groups.h                \
40         empathy-contact-list.h                  \
41         empathy-contact-manager.h               \
42         empathy-contact.h                       \
43         empathy-debug.h                         \
44         empathy-ft-factory.h                    \
45         empathy-ft-handler.h                    \
46         empathy-gsettings.h                     \
47         empathy-presence-manager.h                              \
48         empathy-individual-manager.h            \
49         empathy-irc-network-manager.h           \
50         empathy-irc-network.h                   \
51         empathy-irc-server.h                    \
52         empathy-keyring.h                       \
53         empathy-location.h                      \
54         empathy-message.h                       \
55         empathy-request-util.h                  \
56         empathy-server-sasl-handler.h           \
57         empathy-server-tls-handler.h            \
58         empathy-status-presets.h                \
59         empathy-time.h                          \
60         empathy-tls-certificate.h               \
61         empathy-tls-verifier.h                  \
62         empathy-tp-chat.h                       \
63         empathy-tp-contact-factory.h            \
64         empathy-tp-contact-list.h               \
65         empathy-tp-file.h                       \
66         empathy-tp-roomlist.h                   \
67         empathy-tp-streamed-media.h             \
68         empathy-types.h                         \
69         empathy-utils.h
70
71 libempathy_la_SOURCES =                                 \
72         $(libempathy_headers)                           \
73         action-chain.c                                  \
74         empathy-account-settings.c                      \
75         empathy-auth-factory.c                          \
76         empathy-channel-factory.c \
77         empathy-chatroom-manager.c                      \
78         empathy-chatroom.c                              \
79         empathy-connection-managers.c                   \
80         empathy-connectivity.c                          \
81         empathy-contact-groups.c                        \
82         empathy-contact-list.c                          \
83         empathy-contact-manager.c                       \
84         empathy-contact.c                               \
85         empathy-debug.c                                 \
86         empathy-ft-factory.c                            \
87         empathy-ft-handler.c                            \
88         empathy-presence-manager.c                                      \
89         empathy-individual-manager.c                    \
90         empathy-irc-network-manager.c                   \
91         empathy-irc-network.c                           \
92         empathy-irc-server.c                            \
93         empathy-keyring.c                               \
94         empathy-message.c                               \
95         empathy-request-util.c                          \
96         empathy-server-sasl-handler.c                   \
97         empathy-server-tls-handler.c                    \
98         empathy-status-presets.c                        \
99         empathy-time.c                                  \
100         empathy-tls-certificate.c                       \
101         empathy-tls-verifier.c                          \
102         empathy-tp-chat.c                               \
103         empathy-tp-contact-factory.c                    \
104         empathy-tp-contact-list.c                       \
105         empathy-tp-file.c                               \
106         empathy-tp-roomlist.c                           \
107         empathy-tp-streamed-media.c                     \
108         empathy-utils.c
109
110 # do not distribute generated files
111 nodist_libempathy_la_SOURCES =\
112         $(BUILT_SOURCES)
113
114 libempathy_la_LIBADD =          \
115         $(top_builddir)/extensions/libemp-extensions.la \
116         $(top_builddir)/telepathy-yell/telepathy-yell/libtelepathy-yell.la \
117         $(GCR_LIBS) \
118         $(EMPATHY_LIBS) \
119         $(GEOCLUE_LIBS) \
120         $(GEOCODE_LIBS) \
121         $(NETWORK_MANAGER_LIBS) \
122         $(CONNMAN_LIBS)
123
124 check_c_sources = \
125     $(libempathy_la_SOURCES) \
126     $(libempathy_headers)
127 include $(top_srcdir)/tools/check-coding-style.mk
128 check-local: check-coding-style
129
130 empathy-marshal.list: $(libempathy_la_SOURCES) Makefile.am
131         $(AM_V_GEN)( cd $(srcdir) && \
132         sed -n -e 's/.*empathy_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
133         $(libempathy_la_SOURCES) ) \
134         | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
135         @if cmp -s $@.tmp $@; then \
136                 rm $@.tmp; \
137         else \
138                 mv $@.tmp $@; \
139         fi
140
141 empathy-marshal.h: empathy-marshal.list Makefile
142         $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=_empathy_marshal $< > empathy-marshal.h
143
144 empathy-marshal.c: empathy-marshal.list Makefile
145         $(AM_V_GEN)echo "#include \"empathy-marshal.h\"" > $@ && \
146         $(GLIB_GENMARSHAL) --body --prefix=_empathy_marshal $< >> empathy-marshal.c
147
148 empathy-enum-types.h: stamp-empathy-enum-types.h
149         $(AM_V_GEN)true
150 stamp-empathy-enum-types.h: $(libempathy_headers) Makefile
151         $(AM_V_GEN)(cd $(srcdir) \
152         && glib-mkenums \
153                         --fhead "#ifndef __LIBEMPATHY_ENUM_TYPES_H__\n" \
154                         --fhead "#define __LIBEMPATHY_ENUM_TYPES_H__ 1\n\n" \
155                         --fhead "#include <glib-object.h>\n\n" \
156                         --fhead "G_BEGIN_DECLS\n\n" \
157                         --ftail "G_END_DECLS\n\n" \
158                         --ftail "#endif /* __LIBEMPATHY_ENUM_TYPES_H__ */\n" \
159                         --fprod "#include <libempathy/@filename@>\n" \
160                         --eprod "#define EMPATHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
161                         --eprod "GType @enum_name@_get_type (void);\n" \
162                 $(libempathy_headers) ) > xgen-gth \
163         && (cmp -s xgen-gth empathy-enum-type.h || cp xgen-gth empathy-enum-types.h) \
164         && rm -f xgen-gth \
165         && echo timestamp > $(@F)
166
167 empathy-enum-types.c: $(libempathy_headers) Makefile
168         $(AM_V_GEN)(cd $(srcdir) \
169         && glib-mkenums \
170                         --fhead "#include <config.h>\n" \
171                         --fhead "#include <glib-object.h>\n" \
172                         --fhead "#include \"empathy-enum-types.h\"\n\n" \
173                         --fprod "\n/* enumerations from \"@filename@\" */" \
174                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
175                         --vprod "  { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
176                         --vtail "  { 0, NULL, NULL }\n};\n\n" \
177                         --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
178                         --vtail "  static GType type = 0;\n\n" \
179                         --vtail "  if (!type)\n" \
180                         --vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
181                         --vtail "  return type;\n}\n\n" \
182                 $(libempathy_headers) ) > xgen-gtc \
183         && cp xgen-gtc $(@F) \
184         && rm -f xgen-gtc
185
186 dtddir = $(datadir)/empathy
187 dtd_DATA =                                      \
188         empathy-status-presets.dtd              \
189         empathy-contact-groups.dtd              \
190         empathy-chatroom-manager.dtd            \
191         empathy-irc-networks.dtd
192
193 ircnetworksdir = $(datadir)/empathy
194 ircnetworks_DATA =              \
195         irc-networks.xml
196
197 EXTRA_DIST =                    \
198         empathy-marshal.list    \
199         $(dtd_DATA)             \
200         $(ircnetworks_DATA)
201
202 CLEANFILES =                            \
203         $(BUILT_SOURCES)                \
204         stamp-empathy-enum-types.h