1 include $(top_srcdir)/tools/flymake.mk
5 -I$(top_srcdir)/extensions \
7 -DDATADIR=\""$(datadir)"\" \
8 -DLOCALEDIR=\""$(datadir)/locale"\" \
9 -DG_LOG_DOMAIN=\"empathy\" \
10 -DGCR_API_SUBJECT_TO_CHANGE \
15 $(NETWORK_MANAGER_CFLAGS) \
23 empathy-dtd-resources.c \
24 empathy-dtd-resources.h \
25 empathy-enum-types.h \
28 libempathy_headers = \
29 action-chain-internal.h \
30 empathy-auth-factory.h \
32 empathy-chatroom-manager.h \
34 empathy-client-factory.h \
35 empathy-connection-aggregator.h \
36 empathy-contact-groups.h \
39 empathy-ft-factory.h \
40 empathy-ft-handler.h \
42 empathy-presence-manager.h \
43 empathy-individual-manager.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-tls-verifier.h \
57 libempathy_handwritten_source = \
58 $(libempathy_headers) \
60 empathy-auth-factory.c \
61 empathy-chatroom-manager.c \
63 empathy-client-factory.c \
64 empathy-connection-aggregator.c \
65 empathy-contact-groups.c \
68 empathy-ft-factory.c \
69 empathy-ft-handler.c \
70 empathy-presence-manager.c \
71 empathy-individual-manager.c \
74 empathy-request-util.c \
75 empathy-sasl-mechanisms.c \
76 empathy-server-sasl-handler.c \
77 empathy-server-tls-handler.c \
78 empathy-status-presets.c \
79 empathy-tls-verifier.c \
83 # these are sources that depend on GOA
85 empathy-goa-auth-handler.c \
86 empathy-goa-auth-handler.h \
89 # these are sources that depend on Ubuntu Online Accounts
91 empathy-uoa-auth-handler.c \
92 empathy-uoa-auth-handler.h \
95 pkglib_LTLIBRARIES = libempathy.la
97 # libempathy's API is not stable and will never be, so use -release to make the
98 # SONAME of the plugin library change with every Empathy release.
99 libempathy_la_LDFLAGS = \
101 -release $(VERSION) \
104 libempathy_la_SOURCES = \
105 $(libempathy_handwritten_source) \
108 libempathy_la_LIBADD = \
109 $(top_builddir)/extensions/libemp-extensions.la \
115 $(NETWORK_MANAGER_LIBS) \
122 dtd_resources_files = \
123 empathy-status-presets.dtd \
124 empathy-contact-groups.dtd \
125 empathy-chatroom-manager.dtd \
128 dtd_resource_files: $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/empathy-dtd.gresource.xml)
130 empathy-dtd-resources.c: empathy-dtd.gresource.xml $(dtd_resource_files)
131 $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
133 empathy-dtd-resources.h: empathy-dtd.gresource.xml $(dtd_resource_files)
134 $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header $<
137 empathy-dtd.gresource.xml \
138 $(dtd_resources_files) \
143 stamp-empathy-enum-types.h
146 libempathy_la_SOURCES += $(goa_sources)
148 EXTRA_DIST += $(goa_sources)
152 libempathy_la_SOURCES += $(uoa_sources)
154 EXTRA_DIST += $(uoa_sources)
157 # do not distribute generated files
158 nodist_libempathy_la_SOURCES =\
162 $(libempathy_handwritten_source) \
167 include $(top_srcdir)/tools/check-coding-style.mk
168 check-local: check-coding-style
170 empathy-enum-types.h: stamp-empathy-enum-types.h
172 stamp-empathy-enum-types.h: $(libempathy_headers) Makefile
173 $(AM_V_GEN)(cd $(srcdir) \
175 --fhead "#ifndef __LIBEMPATHY_ENUM_TYPES_H__\n" \
176 --fhead "#define __LIBEMPATHY_ENUM_TYPES_H__ 1\n\n" \
177 --fhead "#include <glib-object.h>\n\n" \
178 --fhead "G_BEGIN_DECLS\n\n" \
179 --ftail "G_END_DECLS\n\n" \
180 --ftail "#endif /* __LIBEMPATHY_ENUM_TYPES_H__ */\n" \
181 --fprod '#include "@filename@"\n' \
182 --eprod "#define EMPATHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
183 --eprod "GType @enum_name@_get_type (void);\n" \
184 $(libempathy_headers) ) > xgen-gth \
185 && (cmp -s xgen-gth empathy-enum-type.h || cp xgen-gth empathy-enum-types.h) \
187 && echo timestamp > $(@F)
189 empathy-enum-types.c: $(libempathy_headers) Makefile
190 $(AM_V_GEN)(cd $(srcdir) \
192 --fhead "#include <config.h>\n" \
193 --fhead "#include <glib-object.h>\n" \
194 --fhead "#include \"empathy-enum-types.h\"\n\n" \
195 --fprod "\n/* enumerations from \"@filename@\" */" \
196 --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
197 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
198 --vtail " { 0, NULL, NULL }\n};\n\n" \
199 --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
200 --vtail " static GType type = 0;\n\n" \
201 --vtail " if (!type)\n" \
202 --vtail " type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
203 --vtail " return type;\n}\n\n" \
204 $(libempathy_headers) ) > xgen-gtc \
205 && cp xgen-gtc $(@F) \