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 \
14 $(NETWORK_MANAGER_CFLAGS) \
22 empathy-dtd-resources.c \
23 empathy-dtd-resources.h \
24 empathy-enum-types.h \
27 libempathy_headers = \
28 action-chain-internal.h \
29 empathy-auth-factory.h \
30 empathy-chatroom-manager.h \
32 empathy-client-factory.h \
33 empathy-connection-aggregator.h \
34 empathy-contact-groups.h \
37 empathy-ft-factory.h \
38 empathy-ft-handler.h \
40 empathy-presence-manager.h \
41 empathy-individual-manager.h \
45 empathy-request-util.h \
46 empathy-sasl-mechanisms.h \
47 empathy-server-sasl-handler.h \
48 empathy-server-tls-handler.h \
49 empathy-status-presets.h \
50 empathy-tls-verifier.h \
55 libempathy_handwritten_source = \
56 $(libempathy_headers) \
58 empathy-auth-factory.c \
59 empathy-chatroom-manager.c \
61 empathy-client-factory.c \
62 empathy-connection-aggregator.c \
63 empathy-contact-groups.c \
66 empathy-ft-factory.c \
67 empathy-ft-handler.c \
68 empathy-presence-manager.c \
69 empathy-individual-manager.c \
72 empathy-request-util.c \
73 empathy-sasl-mechanisms.c \
74 empathy-server-sasl-handler.c \
75 empathy-server-tls-handler.c \
76 empathy-status-presets.c \
77 empathy-tls-verifier.c \
81 # these are sources that depend on GOA
83 empathy-goa-auth-handler.c \
84 empathy-goa-auth-handler.h \
87 # these are sources that depend on Ubuntu Online Accounts
89 empathy-uoa-auth-handler.c \
90 empathy-uoa-auth-handler.h \
93 pkglib_LTLIBRARIES = libempathy.la
95 # libempathy's API is not stable and will never be, so use -release to make the
96 # SONAME of the plugin library change with every Empathy release.
97 libempathy_la_LDFLAGS = \
102 libempathy_la_SOURCES = \
103 $(libempathy_handwritten_source) \
106 libempathy_la_LIBADD = \
107 $(top_builddir)/extensions/libemp-extensions.la \
112 $(NETWORK_MANAGER_LIBS) \
119 dtd_resources_files = \
120 empathy-status-presets.dtd \
121 empathy-contact-groups.dtd \
122 empathy-chatroom-manager.dtd \
125 dtd_resource_files: $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/empathy-dtd.gresource.xml)
127 empathy-dtd-resources.c: empathy-dtd.gresource.xml $(dtd_resource_files)
128 $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
130 empathy-dtd-resources.h: empathy-dtd.gresource.xml $(dtd_resource_files)
131 $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header $<
134 empathy-dtd.gresource.xml \
135 $(dtd_resources_files) \
140 stamp-empathy-enum-types.h
143 libempathy_la_SOURCES += $(goa_sources)
145 EXTRA_DIST += $(goa_sources)
149 libempathy_la_SOURCES += $(uoa_sources)
151 EXTRA_DIST += $(uoa_sources)
154 # do not distribute generated files
155 nodist_libempathy_la_SOURCES =\
159 $(libempathy_handwritten_source) \
164 include $(top_srcdir)/tools/check-coding-style.mk
165 check-local: check-coding-style
167 empathy-enum-types.h: stamp-empathy-enum-types.h
169 stamp-empathy-enum-types.h: $(libempathy_headers) Makefile
170 $(AM_V_GEN)(cd $(srcdir) \
172 --fhead "#ifndef __LIBEMPATHY_ENUM_TYPES_H__\n" \
173 --fhead "#define __LIBEMPATHY_ENUM_TYPES_H__ 1\n\n" \
174 --fhead "#include <glib-object.h>\n\n" \
175 --fhead "G_BEGIN_DECLS\n\n" \
176 --ftail "G_END_DECLS\n\n" \
177 --ftail "#endif /* __LIBEMPATHY_ENUM_TYPES_H__ */\n" \
178 --fprod '#include "@filename@"\n' \
179 --eprod "#define EMPATHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
180 --eprod "GType @enum_name@_get_type (void);\n" \
181 $(libempathy_headers) ) > xgen-gth \
182 && (cmp -s xgen-gth empathy-enum-type.h || cp xgen-gth empathy-enum-types.h) \
184 && echo timestamp > $(@F)
186 empathy-enum-types.c: $(libempathy_headers) Makefile
187 $(AM_V_GEN)(cd $(srcdir) \
189 --fhead "#include <config.h>\n" \
190 --fhead "#include <glib-object.h>\n" \
191 --fhead "#include \"empathy-enum-types.h\"\n\n" \
192 --fprod "\n/* enumerations from \"@filename@\" */" \
193 --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
194 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
195 --vtail " { 0, NULL, NULL }\n};\n\n" \
196 --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
197 --vtail " static GType type = 0;\n\n" \
198 --vtail " if (!type)\n" \
199 --vtail " type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
200 --vtail " return type;\n}\n\n" \
201 $(libempathy_headers) ) > xgen-gtc \
202 && cp xgen-gtc $(@F) \