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 \
47 empathy-request-util.h \
48 empathy-sasl-mechanisms.h \
49 empathy-server-sasl-handler.h \
50 empathy-server-tls-handler.h \
51 empathy-status-presets.h \
53 empathy-tls-verifier.h \
58 libempathy_handwritten_source = \
59 $(libempathy_headers) \
61 empathy-auth-factory.c \
62 empathy-camera-monitor.c \
63 empathy-chatroom-manager.c \
65 empathy-client-factory.c \
66 empathy-connection-aggregator.c \
67 empathy-contact-groups.c \
70 empathy-ft-factory.c \
71 empathy-ft-handler.c \
72 empathy-presence-manager.c \
73 empathy-individual-manager.c \
76 empathy-request-util.c \
77 empathy-sasl-mechanisms.c \
78 empathy-server-sasl-handler.c \
79 empathy-server-tls-handler.c \
80 empathy-status-presets.c \
82 empathy-tls-verifier.c \
86 # these are sources that depend on GOA
88 empathy-goa-auth-handler.c \
89 empathy-goa-auth-handler.h \
92 # these are sources that depend on Ubuntu Online Accounts
94 empathy-uoa-auth-handler.c \
95 empathy-uoa-auth-handler.h \
98 pkglib_LTLIBRARIES = libempathy.la
100 # libempathy's API is not stable and will never be, so use -release to make the
101 # SONAME of the plugin library change with every Empathy release.
102 libempathy_la_LDFLAGS = \
104 -release $(VERSION) \
107 libempathy_la_SOURCES = \
108 $(libempathy_handwritten_source) \
109 cheese-camera-device-monitor.c cheese-camera-device-monitor.h
111 libempathy_la_LIBADD = \
112 $(top_builddir)/extensions/libemp-extensions.la \
117 $(NETWORK_MANAGER_LIBS) \
124 dtd_resources_files = \
125 empathy-status-presets.dtd \
126 empathy-contact-groups.dtd \
127 empathy-chatroom-manager.dtd \
130 dtd_resource_files: $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/empathy-dtd.gresource.xml)
132 empathy-dtd-resources.c: empathy-dtd.gresource.xml $(dtd_resource_files)
133 $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
135 empathy-dtd-resources.h: empathy-dtd.gresource.xml $(dtd_resource_files)
136 $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header $<
139 empathy-dtd.gresource.xml \
140 $(dtd_resources_files) \
145 stamp-empathy-enum-types.h
148 libempathy_la_SOURCES += $(goa_sources)
150 EXTRA_DIST += $(goa_sources)
154 libempathy_la_SOURCES += $(uoa_sources)
156 EXTRA_DIST += $(uoa_sources)
159 # do not distribute generated files
160 nodist_libempathy_la_SOURCES =\
164 $(libempathy_handwritten_source) \
169 include $(top_srcdir)/tools/check-coding-style.mk
170 check-local: check-coding-style
172 empathy-enum-types.h: stamp-empathy-enum-types.h
174 stamp-empathy-enum-types.h: $(libempathy_headers) Makefile
175 $(AM_V_GEN)(cd $(srcdir) \
177 --fhead "#ifndef __LIBEMPATHY_ENUM_TYPES_H__\n" \
178 --fhead "#define __LIBEMPATHY_ENUM_TYPES_H__ 1\n\n" \
179 --fhead "#include <glib-object.h>\n\n" \
180 --fhead "G_BEGIN_DECLS\n\n" \
181 --ftail "G_END_DECLS\n\n" \
182 --ftail "#endif /* __LIBEMPATHY_ENUM_TYPES_H__ */\n" \
183 --fprod '#include "@filename@"\n' \
184 --eprod "#define EMPATHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
185 --eprod "GType @enum_name@_get_type (void);\n" \
186 $(libempathy_headers) ) > xgen-gth \
187 && (cmp -s xgen-gth empathy-enum-type.h || cp xgen-gth empathy-enum-types.h) \
189 && echo timestamp > $(@F)
191 empathy-enum-types.c: $(libempathy_headers) Makefile
192 $(AM_V_GEN)(cd $(srcdir) \
194 --fhead "#include <config.h>\n" \
195 --fhead "#include <glib-object.h>\n" \
196 --fhead "#include \"empathy-enum-types.h\"\n\n" \
197 --fprod "\n/* enumerations from \"@filename@\" */" \
198 --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
199 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
200 --vtail " { 0, NULL, NULL }\n};\n\n" \
201 --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
202 --vtail " static GType type = 0;\n\n" \
203 --vtail " if (!type)\n" \
204 --vtail " type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
205 --vtail " return type;\n}\n\n" \
206 $(libempathy_headers) ) > xgen-gtc \
207 && cp xgen-gtc $(@F) \