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-managers.h \
36 empathy-connection-aggregator.h \
37 empathy-contact-groups.h \
40 empathy-ft-factory.h \
41 empathy-ft-handler.h \
43 empathy-presence-manager.h \
44 empathy-individual-manager.h \
49 empathy-request-util.h \
50 empathy-sasl-mechanisms.h \
51 empathy-server-sasl-handler.h \
52 empathy-server-tls-handler.h \
53 empathy-status-presets.h \
55 empathy-tls-verifier.h \
60 libempathy_handwritten_source = \
61 $(libempathy_headers) \
63 empathy-auth-factory.c \
64 empathy-camera-monitor.c \
65 empathy-chatroom-manager.c \
67 empathy-client-factory.c \
68 empathy-connection-managers.c \
69 empathy-connection-aggregator.c \
70 empathy-contact-groups.c \
73 empathy-ft-factory.c \
74 empathy-ft-handler.c \
75 empathy-presence-manager.c \
76 empathy-individual-manager.c \
80 empathy-request-util.c \
81 empathy-sasl-mechanisms.c \
82 empathy-server-sasl-handler.c \
83 empathy-server-tls-handler.c \
84 empathy-status-presets.c \
86 empathy-tls-verifier.c \
90 # these are sources that depend on GOA
92 empathy-goa-auth-handler.c \
93 empathy-goa-auth-handler.h \
96 # these are sources that depend on Ubuntu Online Accounts
98 empathy-uoa-auth-handler.c \
99 empathy-uoa-auth-handler.h \
100 empathy-uoa-utils.c \
101 empathy-uoa-utils.h \
104 pkglib_LTLIBRARIES = libempathy.la
106 # libempathy's API is not stable and will never be, so use -release to make the
107 # SONAME of the plugin library change with every Empathy release.
108 libempathy_la_LDFLAGS = \
110 -release $(VERSION) \
113 libempathy_la_SOURCES = \
114 $(libempathy_handwritten_source) \
115 cheese-camera-device-monitor.c cheese-camera-device-monitor.h
117 libempathy_la_LIBADD = \
118 $(top_builddir)/extensions/libemp-extensions.la \
123 $(NETWORK_MANAGER_LIBS) \
130 dtd_resources_files = \
131 empathy-status-presets.dtd \
132 empathy-contact-groups.dtd \
133 empathy-chatroom-manager.dtd \
136 dtd_resource_files: $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/empathy-dtd.gresource.xml)
138 empathy-dtd-resources.c: empathy-dtd.gresource.xml $(dtd_resource_files)
139 $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
141 empathy-dtd-resources.h: empathy-dtd.gresource.xml $(dtd_resource_files)
142 $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header $<
145 empathy-dtd.gresource.xml \
146 $(dtd_resources_files) \
151 stamp-empathy-enum-types.h
154 libempathy_la_SOURCES += $(goa_sources)
156 EXTRA_DIST += $(goa_sources)
160 libempathy_la_SOURCES += $(uoa_sources)
162 EXTRA_DIST += $(uoa_sources)
165 # do not distribute generated files
166 nodist_libempathy_la_SOURCES =\
170 $(libempathy_handwritten_source) \
175 include $(top_srcdir)/tools/check-coding-style.mk
176 check-local: check-coding-style
178 empathy-enum-types.h: stamp-empathy-enum-types.h
180 stamp-empathy-enum-types.h: $(libempathy_headers) Makefile
181 $(AM_V_GEN)(cd $(srcdir) \
183 --fhead "#ifndef __LIBEMPATHY_ENUM_TYPES_H__\n" \
184 --fhead "#define __LIBEMPATHY_ENUM_TYPES_H__ 1\n\n" \
185 --fhead "#include <glib-object.h>\n\n" \
186 --fhead "G_BEGIN_DECLS\n\n" \
187 --ftail "G_END_DECLS\n\n" \
188 --ftail "#endif /* __LIBEMPATHY_ENUM_TYPES_H__ */\n" \
189 --fprod '#include "@filename@"\n' \
190 --eprod "#define EMPATHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
191 --eprod "GType @enum_name@_get_type (void);\n" \
192 $(libempathy_headers) ) > xgen-gth \
193 && (cmp -s xgen-gth empathy-enum-type.h || cp xgen-gth empathy-enum-types.h) \
195 && echo timestamp > $(@F)
197 empathy-enum-types.c: $(libempathy_headers) Makefile
198 $(AM_V_GEN)(cd $(srcdir) \
200 --fhead "#include <config.h>\n" \
201 --fhead "#include <glib-object.h>\n" \
202 --fhead "#include \"empathy-enum-types.h\"\n\n" \
203 --fprod "\n/* enumerations from \"@filename@\" */" \
204 --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
205 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
206 --vtail " { 0, NULL, NULL }\n};\n\n" \
207 --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
208 --vtail " static GType type = 0;\n\n" \
209 --vtail " if (!type)\n" \
210 --vtail " type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
211 --vtail " return type;\n}\n\n" \
212 $(libempathy_headers) ) > xgen-gtc \
213 && cp xgen-gtc $(@F) \