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 \
31 empathy-chatroom-manager.h \
33 empathy-client-factory.h \
34 empathy-connection-aggregator.h \
35 empathy-contact-groups.h \
38 empathy-ft-factory.h \
39 empathy-ft-handler.h \
41 empathy-presence-manager.h \
42 empathy-individual-manager.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 \
56 libempathy_handwritten_source = \
57 $(libempathy_headers) \
59 empathy-auth-factory.c \
60 empathy-chatroom-manager.c \
62 empathy-client-factory.c \
63 empathy-connection-aggregator.c \
64 empathy-contact-groups.c \
67 empathy-ft-factory.c \
68 empathy-ft-handler.c \
69 empathy-presence-manager.c \
70 empathy-individual-manager.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 \
82 # these are sources that depend on GOA
84 empathy-goa-auth-handler.c \
85 empathy-goa-auth-handler.h \
88 # these are sources that depend on Ubuntu Online Accounts
90 empathy-uoa-auth-handler.c \
91 empathy-uoa-auth-handler.h \
94 pkglib_LTLIBRARIES = libempathy.la
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 = \
100 -release $(VERSION) \
103 libempathy_la_SOURCES = \
104 $(libempathy_handwritten_source) \
107 libempathy_la_LIBADD = \
108 $(top_builddir)/extensions/libemp-extensions.la \
114 $(NETWORK_MANAGER_LIBS) \
121 dtd_resources_files = \
122 empathy-status-presets.dtd \
123 empathy-contact-groups.dtd \
124 empathy-chatroom-manager.dtd \
127 dtd_resource_files: $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/empathy-dtd.gresource.xml)
129 empathy-dtd-resources.c: empathy-dtd.gresource.xml $(dtd_resource_files)
130 $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
132 empathy-dtd-resources.h: empathy-dtd.gresource.xml $(dtd_resource_files)
133 $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header $<
136 empathy-dtd.gresource.xml \
137 $(dtd_resources_files) \
142 stamp-empathy-enum-types.h
145 libempathy_la_SOURCES += $(goa_sources)
147 EXTRA_DIST += $(goa_sources)
151 libempathy_la_SOURCES += $(uoa_sources)
153 EXTRA_DIST += $(uoa_sources)
156 # do not distribute generated files
157 nodist_libempathy_la_SOURCES =\
161 $(libempathy_handwritten_source) \
166 include $(top_srcdir)/tools/check-coding-style.mk
167 check-local: check-coding-style
169 empathy-enum-types.h: stamp-empathy-enum-types.h
171 stamp-empathy-enum-types.h: $(libempathy_headers) Makefile
172 $(AM_V_GEN)(cd $(srcdir) \
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) \
186 && echo timestamp > $(@F)
188 empathy-enum-types.c: $(libempathy_headers) Makefile
189 $(AM_V_GEN)(cd $(srcdir) \
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) \