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) \
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-camera-monitor.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 \
48 empathy-request-util.h \
49 empathy-sasl-mechanisms.h \
50 empathy-server-sasl-handler.h \
51 empathy-server-tls-handler.h \
52 empathy-status-presets.h \
54 empathy-tls-verifier.h \
59 libempathy_handwritten_source = \
60 $(libempathy_headers) \
62 empathy-auth-factory.c \
63 empathy-camera-monitor.c \
64 empathy-chatroom-manager.c \
66 empathy-client-factory.c \
67 empathy-connection-aggregator.c \
68 empathy-contact-groups.c \
71 empathy-ft-factory.c \
72 empathy-ft-handler.c \
73 empathy-presence-manager.c \
74 empathy-individual-manager.c \
78 empathy-request-util.c \
79 empathy-sasl-mechanisms.c \
80 empathy-server-sasl-handler.c \
81 empathy-server-tls-handler.c \
82 empathy-status-presets.c \
84 empathy-tls-verifier.c \
88 # these are sources that depend on GOA
90 empathy-goa-auth-handler.c \
91 empathy-goa-auth-handler.h \
94 # these are sources that depend on Ubuntu Online Accounts
96 empathy-uoa-auth-handler.c \
97 empathy-uoa-auth-handler.h \
102 pkglib_LTLIBRARIES = libempathy.la
104 # libempathy's API is not stable and will never be, so use -release to make the
105 # SONAME of the plugin library change with every Empathy release.
106 libempathy_la_LDFLAGS = \
108 -release $(VERSION) \
111 libempathy_la_SOURCES = \
112 $(libempathy_handwritten_source) \
113 cheese-camera-device-monitor.c cheese-camera-device-monitor.h
115 libempathy_la_LIBADD = \
116 $(top_builddir)/extensions/libemp-extensions.la \
121 $(NETWORK_MANAGER_LIBS) \
128 dtd_resources_files = \
129 empathy-status-presets.dtd \
130 empathy-contact-groups.dtd \
131 empathy-chatroom-manager.dtd \
134 dtd_resource_files: $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/empathy-dtd.gresource.xml)
136 empathy-dtd-resources.c: empathy-dtd.gresource.xml $(dtd_resource_files)
137 $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
139 empathy-dtd-resources.h: empathy-dtd.gresource.xml $(dtd_resource_files)
140 $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header $<
143 empathy-dtd.gresource.xml \
144 $(dtd_resources_files) \
149 stamp-empathy-enum-types.h
152 libempathy_la_SOURCES += $(goa_sources)
154 EXTRA_DIST += $(goa_sources)
158 libempathy_la_SOURCES += $(uoa_sources)
160 EXTRA_DIST += $(uoa_sources)
163 # do not distribute generated files
164 nodist_libempathy_la_SOURCES =\
168 $(libempathy_handwritten_source) \
173 include $(top_srcdir)/tools/check-coding-style.mk
174 check-local: check-coding-style
176 empathy-enum-types.h: stamp-empathy-enum-types.h
178 stamp-empathy-enum-types.h: $(libempathy_headers) Makefile
179 $(AM_V_GEN)(cd $(srcdir) \
181 --fhead "#ifndef __LIBEMPATHY_ENUM_TYPES_H__\n" \
182 --fhead "#define __LIBEMPATHY_ENUM_TYPES_H__ 1\n\n" \
183 --fhead "#include <glib-object.h>\n\n" \
184 --fhead "G_BEGIN_DECLS\n\n" \
185 --ftail "G_END_DECLS\n\n" \
186 --ftail "#endif /* __LIBEMPATHY_ENUM_TYPES_H__ */\n" \
187 --fprod '#include "@filename@"\n' \
188 --eprod "#define EMPATHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
189 --eprod "GType @enum_name@_get_type (void);\n" \
190 $(libempathy_headers) ) > xgen-gth \
191 && (cmp -s xgen-gth empathy-enum-type.h || cp xgen-gth empathy-enum-types.h) \
193 && echo timestamp > $(@F)
195 empathy-enum-types.c: $(libempathy_headers) Makefile
196 $(AM_V_GEN)(cd $(srcdir) \
198 --fhead "#include <config.h>\n" \
199 --fhead "#include <glib-object.h>\n" \
200 --fhead "#include \"empathy-enum-types.h\"\n\n" \
201 --fprod "\n/* enumerations from \"@filename@\" */" \
202 --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
203 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
204 --vtail " { 0, NULL, NULL }\n};\n\n" \
205 --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
206 --vtail " static GType type = 0;\n\n" \
207 --vtail " if (!type)\n" \
208 --vtail " type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
209 --vtail " return type;\n}\n\n" \
210 $(libempathy_headers) ) > xgen-gtc \
211 && cp xgen-gtc $(@F) \