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-account-settings.h \
31 empathy-auth-factory.h \
32 empathy-camera-monitor.h \
33 empathy-chatroom-manager.h \
35 empathy-client-factory.h \
36 empathy-connection-managers.h \
37 empathy-connection-aggregator.h \
38 empathy-contact-groups.h \
41 empathy-ft-factory.h \
42 empathy-ft-handler.h \
44 empathy-presence-manager.h \
45 empathy-individual-manager.h \
46 empathy-irc-network-manager.h \
47 empathy-irc-network.h \
48 empathy-irc-server.h \
53 empathy-request-util.h \
54 empathy-sasl-mechanisms.h \
55 empathy-server-sasl-handler.h \
56 empathy-server-tls-handler.h \
57 empathy-status-presets.h \
59 empathy-tls-verifier.h \
64 libempathy_handwritten_source = \
65 $(libempathy_headers) \
67 empathy-account-settings.c \
68 empathy-auth-factory.c \
69 empathy-camera-monitor.c \
70 empathy-chatroom-manager.c \
72 empathy-client-factory.c \
73 empathy-connection-managers.c \
74 empathy-connection-aggregator.c \
75 empathy-contact-groups.c \
78 empathy-ft-factory.c \
79 empathy-ft-handler.c \
80 empathy-presence-manager.c \
81 empathy-individual-manager.c \
82 empathy-irc-network-manager.c \
83 empathy-irc-network.c \
84 empathy-irc-server.c \
88 empathy-request-util.c \
89 empathy-sasl-mechanisms.c \
90 empathy-server-sasl-handler.c \
91 empathy-server-tls-handler.c \
92 empathy-status-presets.c \
94 empathy-tls-verifier.c \
98 # these are sources that depend on GOA
100 empathy-goa-auth-handler.c \
101 empathy-goa-auth-handler.h \
104 # these are sources that depend on Ubuntu Online Accounts
106 empathy-uoa-auth-handler.c \
107 empathy-uoa-auth-handler.h \
108 empathy-uoa-utils.c \
109 empathy-uoa-utils.h \
112 pkglib_LTLIBRARIES = libempathy.la
114 # libempathy's API is not stable and will never be, so use -release to make the
115 # SONAME of the plugin library change with every Empathy release.
116 libempathy_la_LDFLAGS = \
118 -release $(VERSION) \
121 libempathy_la_SOURCES = \
122 $(libempathy_handwritten_source) \
123 cheese-camera-device-monitor.c cheese-camera-device-monitor.h
125 libempathy_la_LIBADD = \
126 $(top_builddir)/extensions/libemp-extensions.la \
131 $(NETWORK_MANAGER_LIBS) \
138 dtd_resources_files = \
139 empathy-status-presets.dtd \
140 empathy-contact-groups.dtd \
141 empathy-chatroom-manager.dtd \
142 empathy-irc-networks.dtd
144 ircnetworksdir = $(datadir)/empathy
148 dtd_resource_files: $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/empathy-dtd.gresource.xml)
150 empathy-dtd-resources.c: empathy-dtd.gresource.xml $(dtd_resource_files)
151 $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
153 empathy-dtd-resources.h: empathy-dtd.gresource.xml $(dtd_resource_files)
154 $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header $<
157 empathy-dtd.gresource.xml \
158 $(dtd_resources_files) \
163 stamp-empathy-enum-types.h
166 libempathy_la_SOURCES += $(goa_sources)
168 EXTRA_DIST += $(goa_sources)
172 libempathy_la_SOURCES += $(uoa_sources)
174 EXTRA_DIST += $(uoa_sources)
177 # do not distribute generated files
178 nodist_libempathy_la_SOURCES =\
182 $(libempathy_handwritten_source) \
187 include $(top_srcdir)/tools/check-coding-style.mk
188 check-local: check-coding-style
190 empathy-enum-types.h: stamp-empathy-enum-types.h
192 stamp-empathy-enum-types.h: $(libempathy_headers) Makefile
193 $(AM_V_GEN)(cd $(srcdir) \
195 --fhead "#ifndef __LIBEMPATHY_ENUM_TYPES_H__\n" \
196 --fhead "#define __LIBEMPATHY_ENUM_TYPES_H__ 1\n\n" \
197 --fhead "#include <glib-object.h>\n\n" \
198 --fhead "G_BEGIN_DECLS\n\n" \
199 --ftail "G_END_DECLS\n\n" \
200 --ftail "#endif /* __LIBEMPATHY_ENUM_TYPES_H__ */\n" \
201 --fprod '#include "@filename@"\n' \
202 --eprod "#define EMPATHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
203 --eprod "GType @enum_name@_get_type (void);\n" \
204 $(libempathy_headers) ) > xgen-gth \
205 && (cmp -s xgen-gth empathy-enum-type.h || cp xgen-gth empathy-enum-types.h) \
207 && echo timestamp > $(@F)
209 empathy-enum-types.c: $(libempathy_headers) Makefile
210 $(AM_V_GEN)(cd $(srcdir) \
212 --fhead "#include <config.h>\n" \
213 --fhead "#include <glib-object.h>\n" \
214 --fhead "#include \"empathy-enum-types.h\"\n\n" \
215 --fprod "\n/* enumerations from \"@filename@\" */" \
216 --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
217 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
218 --vtail " { 0, NULL, NULL }\n};\n\n" \
219 --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
220 --vtail " static GType type = 0;\n\n" \
221 --vtail " if (!type)\n" \
222 --vtail " type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
223 --vtail " return type;\n}\n\n" \
224 $(libempathy_headers) ) > xgen-gtc \
225 && cp xgen-gtc $(@F) \