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