]> git.0d.be Git - empathy.git/blob - libempathy/Makefile.am
tpaw-utils: move functions for protocol and service display information
[empathy.git] / libempathy / Makefile.am
1 include $(top_srcdir)/tools/flymake.mk
2
3 AM_CPPFLAGS =                                           \
4         $(ERROR_CFLAGS)                                 \
5         -I$(top_srcdir)/extensions                      \
6         -I$(top_builddir)                               \
7         -DDATADIR=\""$(datadir)"\"                      \
8         -DLOCALEDIR=\""$(datadir)/locale"\"             \
9         -DG_LOG_DOMAIN=\"empathy\"                      \
10         -DGCR_API_SUBJECT_TO_CHANGE                     \
11         $(EMPATHY_CFLAGS)                               \
12         $(GEOCLUE_CFLAGS)                               \
13         $(GEOCODE_CFLAGS)                               \
14         $(NETWORK_MANAGER_CFLAGS)                       \
15         $(CONNMAN_CFLAGS)                               \
16         $(UDEV_CFLAGS)                                  \
17         $(GOA_CFLAGS)                                   \
18         $(UOA_CFLAGS)                                   \
19         $(WARN_CFLAGS)                                  \
20         $(DISABLE_DEPRECATED)
21
22 BUILT_SOURCES =                                         \
23         empathy-dtd-resources.c                         \
24         empathy-dtd-resources.h                         \
25         empathy-enum-types.h                            \
26         empathy-enum-types.c
27
28 libempathy_headers =                            \
29         action-chain-internal.h                 \
30         empathy-auth-factory.h                  \
31         empathy-camera-monitor.h                \
32         empathy-chatroom-manager.h              \
33         empathy-chatroom.h                      \
34         empathy-client-factory.h \
35         empathy-connection-aggregator.h         \
36         empathy-contact-groups.h                \
37         empathy-contact.h                       \
38         empathy-debug.h                         \
39         empathy-ft-factory.h                    \
40         empathy-ft-handler.h                    \
41         empathy-gsettings.h                     \
42         empathy-presence-manager.h                              \
43         empathy-individual-manager.h            \
44         empathy-location.h                      \
45         empathy-message.h                       \
46         empathy-pkg-kit.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                \
52         empathy-time.h                          \
53         empathy-tls-verifier.h                  \
54         empathy-tp-chat.h                       \
55         empathy-types.h                         \
56         empathy-utils.h
57
58 libempathy_handwritten_source =                         \
59         $(libempathy_headers)                           \
60         action-chain.c                                  \
61         empathy-auth-factory.c                          \
62         empathy-camera-monitor.c                        \
63         empathy-chatroom-manager.c                      \
64         empathy-chatroom.c                              \
65         empathy-client-factory.c \
66         empathy-connection-aggregator.c         \
67         empathy-contact-groups.c                        \
68         empathy-contact.c                               \
69         empathy-debug.c                                 \
70         empathy-ft-factory.c                            \
71         empathy-ft-handler.c                            \
72         empathy-presence-manager.c                                      \
73         empathy-individual-manager.c                    \
74         empathy-message.c                               \
75         empathy-pkg-kit.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                        \
81         empathy-time.c                                  \
82         empathy-tls-verifier.c                          \
83         empathy-tp-chat.c                               \
84         empathy-utils.c
85
86 # these are sources that depend on GOA
87 goa_sources = \
88         empathy-goa-auth-handler.c \
89         empathy-goa-auth-handler.h \
90         $(NULL)
91
92 # these are sources that depend on Ubuntu Online Accounts
93 uoa_sources = \
94         empathy-uoa-auth-handler.c \
95         empathy-uoa-auth-handler.h \
96         $(NULL)
97
98 pkglib_LTLIBRARIES = libempathy.la
99
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 = \
103    -no-undefined \
104    -release $(VERSION) \
105    $(NULL)
106
107 libempathy_la_SOURCES = \
108         $(libempathy_handwritten_source) \
109         cheese-camera-device-monitor.c cheese-camera-device-monitor.h
110
111 libempathy_la_LIBADD =          \
112         $(top_builddir)/extensions/libemp-extensions.la \
113         $(GCR_LIBS) \
114         $(EMPATHY_LIBS) \
115         $(GEOCLUE_LIBS) \
116         $(GEOCODE_LIBS) \
117         $(NETWORK_MANAGER_LIBS) \
118         $(CONNMAN_LIBS) \
119         $(UDEV_LIBS) \
120         $(GOA_LIBS) \
121         $(UOA_LIBS) \
122         $(LIBM)
123
124 dtd_resources_files =                           \
125         empathy-status-presets.dtd              \
126         empathy-contact-groups.dtd              \
127         empathy-chatroom-manager.dtd            \
128         $(NULL)
129
130 dtd_resource_files: $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/empathy-dtd.gresource.xml)
131
132 empathy-dtd-resources.c: empathy-dtd.gresource.xml $(dtd_resource_files)
133         $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
134
135 empathy-dtd-resources.h: empathy-dtd.gresource.xml $(dtd_resource_files)
136         $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header $<
137
138 EXTRA_DIST =                            \
139         empathy-dtd.gresource.xml       \
140         $(dtd_resources_files)          \
141         $(NULL)
142
143 CLEANFILES =                            \
144         $(BUILT_SOURCES)                \
145         stamp-empathy-enum-types.h
146
147 if HAVE_GOA
148 libempathy_la_SOURCES += $(goa_sources)
149 else
150 EXTRA_DIST += $(goa_sources)
151 endif
152
153 if HAVE_UOA
154 libempathy_la_SOURCES += $(uoa_sources)
155 else
156 EXTRA_DIST += $(uoa_sources)
157 endif
158
159 # do not distribute generated files
160 nodist_libempathy_la_SOURCES =\
161         $(BUILT_SOURCES)
162
163 check_c_sources = \
164     $(libempathy_handwritten_source) \
165     $(goa_sources) \
166     $(uoa_sources) \
167     $(NULL)
168
169 include $(top_srcdir)/tools/check-coding-style.mk
170 check-local: check-coding-style
171
172 empathy-enum-types.h: stamp-empathy-enum-types.h
173         $(AM_V_GEN)true
174 stamp-empathy-enum-types.h: $(libempathy_headers) Makefile
175         $(AM_V_GEN)(cd $(srcdir) \
176         && glib-mkenums \
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) \
188         && rm -f xgen-gth \
189         && echo timestamp > $(@F)
190
191 empathy-enum-types.c: $(libempathy_headers) Makefile
192         $(AM_V_GEN)(cd $(srcdir) \
193         && glib-mkenums \
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) \
208         && rm -f xgen-gtc