]> git.0d.be Git - empathy.git/blob - libempathy/Makefile.am
Use the telepathy-account-widgets submodule instead of the internal copy
[empathy.git] / libempathy / Makefile.am
1 include $(top_srcdir)/tools/flymake.mk
2
3 AM_CPPFLAGS =                                           \
4         $(ERROR_CFLAGS)                                 \
5         -I$(top_srcdir)/extensions                      \
6         -I$(top_builddir)                               \
7         -DDATADIR=\""$(datadir)"\"                      \
8         -DLOCALEDIR=\""$(datadir)/locale"\"             \
9         -DG_LOG_DOMAIN=\"empathy\"                      \
10         -DGCR_API_SUBJECT_TO_CHANGE                     \
11         $(EMPATHY_CFLAGS)                               \
12         $(TPAW_CFLAGS)                                  \
13         $(GEOCLUE_CFLAGS)                               \
14         $(GEOCODE_CFLAGS)                               \
15         $(NETWORK_MANAGER_CFLAGS)                       \
16         $(CONNMAN_CFLAGS)                               \
17         $(GOA_CFLAGS)                                   \
18         $(UOA_CFLAGS)                                   \
19         $(WARN_CFLAGS)                                  \
20         $(DISABLE_DEPRECATED)
21
22 BUILT_SOURCES =                                         \
23         empathy-dtd-resources.c                         \
24         empathy-dtd-resources.h                         \
25         empathy-enum-types.h                            \
26         empathy-enum-types.c
27
28 libempathy_headers =                            \
29         action-chain-internal.h                 \
30         empathy-auth-factory.h                  \
31         empathy-chatroom-manager.h              \
32         empathy-chatroom.h                      \
33         empathy-client-factory.h \
34         empathy-connection-aggregator.h         \
35         empathy-contact-groups.h                \
36         empathy-contact.h                       \
37         empathy-debug.h                         \
38         empathy-ft-factory.h                    \
39         empathy-ft-handler.h                    \
40         empathy-gsettings.h                     \
41         empathy-presence-manager.h                              \
42         empathy-individual-manager.h            \
43         empathy-location.h                      \
44         empathy-message.h                       \
45         empathy-pkg-kit.h               \
46         empathy-request-util.h                  \
47         empathy-sasl-mechanisms.h               \
48         empathy-server-sasl-handler.h           \
49         empathy-server-tls-handler.h            \
50         empathy-status-presets.h                \
51         empathy-tls-verifier.h                  \
52         empathy-tp-chat.h                       \
53         empathy-types.h                         \
54         empathy-utils.h
55
56 libempathy_handwritten_source =                         \
57         $(libempathy_headers)                           \
58         action-chain.c                                  \
59         empathy-auth-factory.c                          \
60         empathy-chatroom-manager.c                      \
61         empathy-chatroom.c                              \
62         empathy-client-factory.c \
63         empathy-connection-aggregator.c         \
64         empathy-contact-groups.c                        \
65         empathy-contact.c                               \
66         empathy-debug.c                                 \
67         empathy-ft-factory.c                            \
68         empathy-ft-handler.c                            \
69         empathy-presence-manager.c                                      \
70         empathy-individual-manager.c                    \
71         empathy-message.c                               \
72         empathy-pkg-kit.c               \
73         empathy-request-util.c                          \
74         empathy-sasl-mechanisms.c                       \
75         empathy-server-sasl-handler.c                   \
76         empathy-server-tls-handler.c                    \
77         empathy-status-presets.c                        \
78         empathy-tls-verifier.c                          \
79         empathy-tp-chat.c                               \
80         empathy-utils.c
81
82 # these are sources that depend on GOA
83 goa_sources = \
84         empathy-goa-auth-handler.c \
85         empathy-goa-auth-handler.h \
86         $(NULL)
87
88 # these are sources that depend on Ubuntu Online Accounts
89 uoa_sources = \
90         empathy-uoa-auth-handler.c \
91         empathy-uoa-auth-handler.h \
92         $(NULL)
93
94 pkglib_LTLIBRARIES = libempathy.la
95
96 # libempathy's API is not stable and will never be, so use -release to make the
97 # SONAME of the plugin library change with every Empathy release.
98 libempathy_la_LDFLAGS = \
99    -no-undefined \
100    -release $(VERSION) \
101    $(NULL)
102
103 libempathy_la_SOURCES = \
104         $(libempathy_handwritten_source) \
105         $(NULL)
106
107 libempathy_la_LIBADD =          \
108         $(top_builddir)/extensions/libemp-extensions.la \
109         $(GCR_LIBS) \
110         $(EMPATHY_LIBS) \
111         $(TPAW_LIBS) \
112         $(GEOCLUE_LIBS) \
113         $(GEOCODE_LIBS) \
114         $(NETWORK_MANAGER_LIBS) \
115         $(CONNMAN_LIBS) \
116         $(UDEV_LIBS) \
117         $(GOA_LIBS) \
118         $(UOA_LIBS) \
119         $(LIBM)
120
121 dtd_resources_files =                           \
122         empathy-status-presets.dtd              \
123         empathy-contact-groups.dtd              \
124         empathy-chatroom-manager.dtd            \
125         $(NULL)
126
127 dtd_resource_files: $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/empathy-dtd.gresource.xml)
128
129 empathy-dtd-resources.c: empathy-dtd.gresource.xml $(dtd_resource_files)
130         $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
131
132 empathy-dtd-resources.h: empathy-dtd.gresource.xml $(dtd_resource_files)
133         $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header $<
134
135 EXTRA_DIST =                            \
136         empathy-dtd.gresource.xml       \
137         $(dtd_resources_files)          \
138         $(NULL)
139
140 CLEANFILES =                            \
141         $(BUILT_SOURCES)                \
142         stamp-empathy-enum-types.h
143
144 if HAVE_GOA
145 libempathy_la_SOURCES += $(goa_sources)
146 else
147 EXTRA_DIST += $(goa_sources)
148 endif
149
150 if HAVE_UOA
151 libempathy_la_SOURCES += $(uoa_sources)
152 else
153 EXTRA_DIST += $(uoa_sources)
154 endif
155
156 # do not distribute generated files
157 nodist_libempathy_la_SOURCES =\
158         $(BUILT_SOURCES)
159
160 check_c_sources = \
161     $(libempathy_handwritten_source) \
162     $(goa_sources) \
163     $(uoa_sources) \
164     $(NULL)
165
166 include $(top_srcdir)/tools/check-coding-style.mk
167 check-local: check-coding-style
168
169 empathy-enum-types.h: stamp-empathy-enum-types.h
170         $(AM_V_GEN)true
171 stamp-empathy-enum-types.h: $(libempathy_headers) Makefile
172         $(AM_V_GEN)(cd $(srcdir) \
173         && glib-mkenums \
174                         --fhead "#ifndef __LIBEMPATHY_ENUM_TYPES_H__\n" \
175                         --fhead "#define __LIBEMPATHY_ENUM_TYPES_H__ 1\n\n" \
176                         --fhead "#include <glib-object.h>\n\n" \
177                         --fhead "G_BEGIN_DECLS\n\n" \
178                         --ftail "G_END_DECLS\n\n" \
179                         --ftail "#endif /* __LIBEMPATHY_ENUM_TYPES_H__ */\n" \
180                         --fprod '#include "@filename@"\n' \
181                         --eprod "#define EMPATHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
182                         --eprod "GType @enum_name@_get_type (void);\n" \
183                 $(libempathy_headers) ) > xgen-gth \
184         && (cmp -s xgen-gth empathy-enum-type.h || cp xgen-gth empathy-enum-types.h) \
185         && rm -f xgen-gth \
186         && echo timestamp > $(@F)
187
188 empathy-enum-types.c: $(libempathy_headers) Makefile
189         $(AM_V_GEN)(cd $(srcdir) \
190         && glib-mkenums \
191                         --fhead "#include <config.h>\n" \
192                         --fhead "#include <glib-object.h>\n" \
193                         --fhead "#include \"empathy-enum-types.h\"\n\n" \
194                         --fprod "\n/* enumerations from \"@filename@\" */" \
195                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
196                         --vprod "  { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
197                         --vtail "  { 0, NULL, NULL }\n};\n\n" \
198                         --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
199                         --vtail "  static GType type = 0;\n\n" \
200                         --vtail "  if (!type)\n" \
201                         --vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
202                         --vtail "  return type;\n}\n\n" \
203                 $(libempathy_headers) ) > xgen-gtc \
204         && cp xgen-gtc $(@F) \
205         && rm -f xgen-gtc