]> git.0d.be Git - empathy.git/blob - libempathy/Makefile.am
Use double quotes for all internal headers
[empathy.git] / libempathy / Makefile.am
1 include $(top_srcdir)/tools/flymake.mk
2
3 AM_CPPFLAGS =                                           \
4         $(ERROR_CFLAGS)                                 \
5         -I.                                             \
6         -I$(top_srcdir)                                 \
7         -I$(top_builddir)                               \
8         -DDATADIR=\""$(datadir)"\"                      \
9         -DLOCALEDIR=\""$(datadir)/locale"\"             \
10         -DG_LOG_DOMAIN=\"empathy\"                      \
11         -DGCR_API_SUBJECT_TO_CHANGE                     \
12         $(EMPATHY_CFLAGS)                               \
13         $(GEOCLUE_CFLAGS)                               \
14         $(GEOCODE_CFLAGS)                               \
15         $(NETWORK_MANAGER_CFLAGS)                       \
16         $(CONNMAN_CFLAGS)                               \
17         $(UDEV_CFLAGS)                                  \
18         $(GOA_CFLAGS)                                   \
19         $(UOA_CFLAGS)                                   \
20         $(WARN_CFLAGS)                                  \
21         $(DISABLE_DEPRECATED)
22
23 BUILT_SOURCES =                                         \
24         empathy-dtd-resources.c                         \
25         empathy-dtd-resources.h                         \
26         empathy-enum-types.h                            \
27         empathy-enum-types.c
28
29 libempathy_headers =                            \
30         action-chain-internal.h                 \
31         empathy-account-settings.h              \
32         empathy-auth-factory.h                  \
33         empathy-camera-monitor.h                \
34         empathy-chatroom-manager.h              \
35         empathy-chatroom.h                      \
36         empathy-client-factory.h \
37         empathy-connection-managers.h           \
38         empathy-connection-aggregator.h         \
39         empathy-contact-groups.h                \
40         empathy-contact.h                       \
41         empathy-debug.h                         \
42         empathy-ft-factory.h                    \
43         empathy-ft-handler.h                    \
44         empathy-gsettings.h                     \
45         empathy-presence-manager.h                              \
46         empathy-individual-manager.h            \
47         empathy-irc-network-manager.h           \
48         empathy-irc-network.h                   \
49         empathy-irc-server.h                    \
50         empathy-keyring.h                       \
51         empathy-location.h                      \
52         empathy-message.h                       \
53         empathy-pkg-kit.h               \
54         empathy-request-util.h                  \
55         empathy-sasl-mechanisms.h               \
56         empathy-server-sasl-handler.h           \
57         empathy-server-tls-handler.h            \
58         empathy-status-presets.h                \
59         empathy-time.h                          \
60         empathy-tls-verifier.h                  \
61         empathy-tp-chat.h                       \
62         empathy-types.h                         \
63         empathy-utils.h
64
65 libempathy_handwritten_source =                         \
66         $(libempathy_headers)                           \
67         action-chain.c                                  \
68         empathy-account-settings.c                      \
69         empathy-auth-factory.c                          \
70         empathy-camera-monitor.c                        \
71         empathy-chatroom-manager.c                      \
72         empathy-chatroom.c                              \
73         empathy-client-factory.c \
74         empathy-connection-managers.c                   \
75         empathy-connection-aggregator.c         \
76         empathy-contact-groups.c                        \
77         empathy-contact.c                               \
78         empathy-debug.c                                 \
79         empathy-ft-factory.c                            \
80         empathy-ft-handler.c                            \
81         empathy-presence-manager.c                                      \
82         empathy-individual-manager.c                    \
83         empathy-irc-network-manager.c                   \
84         empathy-irc-network.c                           \
85         empathy-irc-server.c                            \
86         empathy-keyring.c                               \
87         empathy-message.c                               \
88         empathy-pkg-kit.c               \
89         empathy-request-util.c                          \
90         empathy-sasl-mechanisms.c                       \
91         empathy-server-sasl-handler.c                   \
92         empathy-server-tls-handler.c                    \
93         empathy-status-presets.c                        \
94         empathy-time.c                                  \
95         empathy-tls-verifier.c                          \
96         empathy-tp-chat.c                               \
97         empathy-utils.c
98
99 # these are sources that depend on GOA
100 goa_sources = \
101         empathy-goa-auth-handler.c \
102         empathy-goa-auth-handler.h \
103         $(NULL)
104
105 # these are sources that depend on Ubuntu Online Accounts
106 uoa_sources = \
107         empathy-uoa-auth-handler.c \
108         empathy-uoa-auth-handler.h \
109         empathy-uoa-utils.c \
110         empathy-uoa-utils.h \
111         $(NULL)
112
113 pkglib_LTLIBRARIES = libempathy.la
114
115 # libempathy's API is not stable and will never be, so use -release to make the
116 # SONAME of the plugin library change with every Empathy release.
117 libempathy_la_LDFLAGS = \
118    -no-undefined \
119    -release $(VERSION) \
120    $(NULL)
121
122 libempathy_la_SOURCES = \
123         $(libempathy_handwritten_source) \
124         cheese-camera-device-monitor.c cheese-camera-device-monitor.h
125
126 libempathy_la_LIBADD =          \
127         $(top_builddir)/extensions/libemp-extensions.la \
128         $(GCR_LIBS) \
129         $(EMPATHY_LIBS) \
130         $(GEOCLUE_LIBS) \
131         $(GEOCODE_LIBS) \
132         $(NETWORK_MANAGER_LIBS) \
133         $(CONNMAN_LIBS) \
134         $(UDEV_LIBS) \
135         $(GOA_LIBS) \
136         $(UOA_LIBS) \
137         $(LIBM)
138
139 dtd_resources_files =                           \
140         empathy-status-presets.dtd              \
141         empathy-contact-groups.dtd              \
142         empathy-chatroom-manager.dtd            \
143         empathy-irc-networks.dtd
144
145 ircnetworksdir = $(datadir)/empathy
146 ircnetworks_DATA =              \
147         irc-networks.xml
148
149 dtd_resource_files: $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/empathy-dtd.gresource.xml)
150
151 empathy-dtd-resources.c: empathy-dtd.gresource.xml $(dtd_resource_files)
152         $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
153
154 empathy-dtd-resources.h: empathy-dtd.gresource.xml $(dtd_resource_files)
155         $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header $<
156
157 EXTRA_DIST =                            \
158         empathy-dtd.gresource.xml       \
159         $(dtd_resources_files)          \
160         $(ircnetworks_DATA)
161
162 CLEANFILES =                            \
163         $(BUILT_SOURCES)                \
164         stamp-empathy-enum-types.h
165
166 if HAVE_GOA
167 libempathy_la_SOURCES += $(goa_sources)
168 else
169 EXTRA_DIST += $(goa_sources)
170 endif
171
172 if HAVE_UOA
173 libempathy_la_SOURCES += $(uoa_sources)
174 else
175 EXTRA_DIST += $(uoa_sources)
176 endif
177
178 # do not distribute generated files
179 nodist_libempathy_la_SOURCES =\
180         $(BUILT_SOURCES)
181
182 check_c_sources = \
183     $(libempathy_handwritten_source) \
184     $(goa_sources) \
185     $(uoa_sources) \
186     $(NULL)
187
188 include $(top_srcdir)/tools/check-coding-style.mk
189 check-local: check-coding-style
190
191 empathy-enum-types.h: stamp-empathy-enum-types.h
192         $(AM_V_GEN)true
193 stamp-empathy-enum-types.h: $(libempathy_headers) Makefile
194         $(AM_V_GEN)(cd $(srcdir) \
195         && glib-mkenums \
196                         --fhead "#ifndef __LIBEMPATHY_ENUM_TYPES_H__\n" \
197                         --fhead "#define __LIBEMPATHY_ENUM_TYPES_H__ 1\n\n" \
198                         --fhead "#include <glib-object.h>\n\n" \
199                         --fhead "G_BEGIN_DECLS\n\n" \
200                         --ftail "G_END_DECLS\n\n" \
201                         --ftail "#endif /* __LIBEMPATHY_ENUM_TYPES_H__ */\n" \
202                         --fprod '#include "libempathy/@filename@"\n' \
203                         --eprod "#define EMPATHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
204                         --eprod "GType @enum_name@_get_type (void);\n" \
205                 $(libempathy_headers) ) > xgen-gth \
206         && (cmp -s xgen-gth empathy-enum-type.h || cp xgen-gth empathy-enum-types.h) \
207         && rm -f xgen-gth \
208         && echo timestamp > $(@F)
209
210 empathy-enum-types.c: $(libempathy_headers) Makefile
211         $(AM_V_GEN)(cd $(srcdir) \
212         && glib-mkenums \
213                         --fhead "#include <config.h>\n" \
214                         --fhead "#include <glib-object.h>\n" \
215                         --fhead "#include \"empathy-enum-types.h\"\n\n" \
216                         --fprod "\n/* enumerations from \"@filename@\" */" \
217                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
218                         --vprod "  { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
219                         --vtail "  { 0, NULL, NULL }\n};\n\n" \
220                         --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
221                         --vtail "  static GType type = 0;\n\n" \
222                         --vtail "  if (!type)\n" \
223                         --vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
224                         --vtail "  return type;\n}\n\n" \
225                 $(libempathy_headers) ) > xgen-gtc \
226         && cp xgen-gtc $(@F) \
227         && rm -f xgen-gtc