Split camel-imapx library and merge into camel so that providers can be written on...
[platform/upstream/evolution-data-server.git] / camel / Makefile.am
1 SUBDIRS = . providers tests
2
3 if OS_WIN32
4 LIBCAMEL_PLATFORM_DEP_SOURCES = \
5         camel-win32.c
6 LOCK_HELPER =
7 else
8 LIBCAMEL_PLATFORM_DEP_SOURCES = \
9         camel-lock-client.c \
10         camel-movemail.c \
11         camel-stream-process.c
12 LOCK_HELPER = camel-lock-helper-1.2
13 endif
14
15 MARSHAL_GENERATED = camel-marshal.c camel-marshal.h
16 @EVO_MARSHAL_RULE@
17
18 %-$(API_VERSION).pc: %.pc
19          cp $< $@
20
21 pkgconfigdir = $(libdir)/pkgconfig
22 pkgconfig_in_files = camel.pc.in
23 pkgconfig_DATA = $(pkgconfig_in_files:.pc.in=-$(API_VERSION).pc)
24
25 camel-imapx-tokenise.h: camel-imapx-tokens.txt
26         @GPERF@ -H imapx_hash -N imapx_tokenise_struct -L ANSI-C -o -t -k1,$$ $< --output-file=$@
27
28 libcamelincludedir = $(privincludedir)/camel
29
30 camellibexecdir = $(libexecdir)
31 camellibexec_PROGRAMS = $(LOCK_HELPER) camel-index-control-1.2
32
33 lib_LTLIBRARIES = libcamel-1.2.la
34
35 include $(top_srcdir)/camel/glib-gen.mak
36 glib_enum_headers=camel-enums.h
37 glib_enum_output=camel-enumtypes
38 glib_enum_define=CAMEL
39 glib_enum_prefix=camel
40
41 ENUM_GENERATED = camel-enumtypes.h camel-enumtypes.c camel-imapx-tokenise.h
42
43 libcamel_1_2_la_CPPFLAGS = \
44         $(AM_CPPFLAGS)                                          \
45         -I$(top_srcdir)                                         \
46         -I$(top_builddir)                                       \
47         -I$(srcdir)                                             \
48         -DCAMEL_LIBEXECDIR=\""$(camellibexecdir)"\"             \
49         -DCAMEL_PROVIDERDIR=\""$(camel_providerdir)"\"          \
50         -DG_LOG_DOMAIN=\"camel\"                                \
51         -DE_DATA_SERVER_PREFIX=\"$(prefix)\"                    \
52         -DLOCALEDIR=\""$(localedir)"\"                          \
53         -DCAMEL_COMPILATION                                     \
54         $(CAMEL_CFLAGS)                                         \
55         $(CODE_COVERAGE_CFLAGS)                                 \
56         $(NULL)
57
58 libcamel_1_2_la_SOURCES =                       \
59         $(ENUM_GENERATED)                       \
60         $(MARSHAL_GENERATED)                    \
61         camel-address.c                         \
62         camel-block-file.c                      \
63         camel-certdb.c                          \
64         camel-charset-map.c                     \
65         camel-cipher-context.c                  \
66         camel-data-cache.c                      \
67         camel-data-wrapper.c                    \
68         camel-db.c                              \
69         camel-debug.c                           \
70         camel-disco-diary.c                     \
71         camel-disco-folder.c                    \
72         camel-disco-store.c                     \
73         camel-file-utils.c                      \
74         camel-filter-driver.c                   \
75         camel-filter-search.c                   \
76         camel-folder-search.c                   \
77         camel-folder-summary.c                  \
78         camel-folder-thread.c                   \
79         camel-folder.c                          \
80         camel-gpg-context.c                     \
81         camel-html-parser.c                     \
82         camel-iconv.c                           \
83         camel-index.c                           \
84         camel-internet-address.c                \
85         camel-junk-filter.c                     \
86         camel-local-settings.c                  \
87         camel-lock.c                            \
88         camel-medium.c                          \
89         camel-memchunk.c                        \
90         camel-mempool.c                         \
91         camel-mime-filter-basic.c               \
92         camel-mime-filter-bestenc.c             \
93         camel-mime-filter-canon.c               \
94         camel-mime-filter-charset.c             \
95         camel-mime-filter-crlf.c                \
96         camel-mime-filter-enriched.c            \
97         camel-mime-filter-from.c                \
98         camel-mime-filter-gzip.c                \
99         camel-mime-filter-html.c                \
100         camel-mime-filter-index.c               \
101         camel-mime-filter-linewrap.c            \
102         camel-mime-filter-pgp.c                 \
103         camel-mime-filter-progress.c            \
104         camel-mime-filter-save.c                \
105         camel-mime-filter-tohtml.c              \
106         camel-mime-filter-windows.c             \
107         camel-mime-filter-yenc.c                \
108         camel-mime-filter.c                     \
109         camel-mime-message.c                    \
110         camel-mime-parser.c                     \
111         camel-mime-part-utils.c                 \
112         camel-mime-part.c                       \
113         camel-mime-tables.c                     \
114         camel-mime-utils.c                      \
115         camel-msgport.c                         \
116         camel-multipart-encrypted.c             \
117         camel-multipart-signed.c                \
118         camel-multipart.c                       \
119         camel-net-utils.c                       \
120         camel-network-service.c                 \
121         camel-network-settings.c                \
122         camel-nntp-address.c                    \
123         camel-object-bag.c                      \
124         camel-object.c                          \
125         camel-offline-folder.c                  \
126         camel-offline-journal.c                 \
127         camel-offline-settings.c                \
128         camel-offline-store.c                   \
129         camel-operation.c                       \
130         camel-partition-table.c                 \
131         camel-provider.c                        \
132         camel-sasl-anonymous.c                  \
133         camel-sasl-cram-md5.c                   \
134         camel-sasl-digest-md5.c                 \
135         camel-sasl-gssapi.c                     \
136         camel-sasl-login.c                      \
137         camel-sasl-ntlm.c                       \
138         camel-sasl-plain.c                      \
139         camel-sasl-popb4smtp.c                  \
140         camel-sasl.c                            \
141         camel-search-private.c                  \
142         camel-search-sql-sexp.c                 \
143         camel-search-sql.c                      \
144         camel-service.c                         \
145         camel-session.c                         \
146         camel-settings.c                        \
147         camel-sexp.c                            \
148         camel-smime-context.c                   \
149         camel-store-settings.c                  \
150         camel-store-summary.c                   \
151         camel-store.c                           \
152         camel-stream-buffer.c                   \
153         camel-stream-filter.c                   \
154         camel-stream-fs.c                       \
155         camel-stream-mem.c                      \
156         camel-stream-null.c                     \
157         camel-stream-vfs.c                      \
158         camel-stream.c                          \
159         camel-string-utils.c                    \
160         camel-subscribable.c                    \
161         camel-tcp-stream-raw.c                  \
162         camel-tcp-stream-ssl.c                  \
163         camel-tcp-stream.c                      \
164         camel-text-index.c                      \
165         camel-transport.c                       \
166         camel-trie.c                            \
167         camel-uid-cache.c                       \
168         camel-url-scanner.c                     \
169         camel-url.c                             \
170         camel-utf8.c                            \
171         camel-vee-folder.c                      \
172         camel-vee-store.c                       \
173         camel-vee-summary.c                     \
174         camel-vtrash-folder.c                   \
175         camel-imapx-command.c                   \
176         camel-imapx-job.c                       \
177         camel-imapx-settings.c                  \
178         camel-imapx-server.c                    \
179         camel-imapx-conn-manager.c              \
180         camel-imapx-folder.c                    \
181         camel-imapx-store-summary.c             \
182         camel-imapx-store.c                     \
183         camel-imapx-stream.c                    \
184         camel-imapx-summary.c                   \
185         camel-imapx-utils.c                     \
186         camel.c                                 \
187         $(LIBCAMEL_PLATFORM_DEP_SOURCES)
188
189 libcamelinclude_HEADERS =                       \
190         camel-address.h                         \
191         camel-block-file.h                      \
192         camel-certdb.h                          \
193         camel-charset-map.h                     \
194         camel-cipher-context.h                  \
195         camel-data-cache.h                      \
196         camel-data-wrapper.h                    \
197         camel-db.h                              \
198         camel-debug.h                           \
199         camel-disco-diary.h                     \
200         camel-disco-folder.h                    \
201         camel-disco-store.h                     \
202         camel-enums.h                           \
203         camel-enumtypes.h                       \
204         camel-file-utils.h                      \
205         camel-filter-driver.h                   \
206         camel-filter-search.h                   \
207         camel-folder-search.h                   \
208         camel-folder-summary.h                  \
209         camel-folder-thread.h                   \
210         camel-folder.h                          \
211         camel-gpg-context.h                     \
212         camel-html-parser.h                     \
213         camel-iconv.h                           \
214         camel-index.h                           \
215         camel-internet-address.h                \
216         camel-junk-filter.h                     \
217         camel-local-settings.h                  \
218         camel-lock-client.h                     \
219         camel-lock-helper.h                     \
220         camel-lock.h                            \
221         camel-medium.h                          \
222         camel-memchunk.h                        \
223         camel-mempool.h                         \
224         camel-mime-filter-basic.h               \
225         camel-mime-filter-bestenc.h             \
226         camel-mime-filter-canon.h               \
227         camel-mime-filter-charset.h             \
228         camel-mime-filter-crlf.h                \
229         camel-mime-filter-enriched.h            \
230         camel-mime-filter-from.h                \
231         camel-mime-filter-gzip.h                \
232         camel-mime-filter-html.h                \
233         camel-mime-filter-index.h               \
234         camel-mime-filter-linewrap.h            \
235         camel-mime-filter-pgp.h                 \
236         camel-mime-filter-progress.h            \
237         camel-mime-filter-save.h                \
238         camel-mime-filter-tohtml.h              \
239         camel-mime-filter-windows.h             \
240         camel-mime-filter-yenc.h                \
241         camel-mime-filter.h                     \
242         camel-mime-message.h                    \
243         camel-mime-parser.h                     \
244         camel-mime-part-utils.h                 \
245         camel-mime-part.h                       \
246         camel-mime-utils.h                      \
247         camel-movemail.h                        \
248         camel-msgport.h                         \
249         camel-multipart-encrypted.h             \
250         camel-multipart-signed.h                \
251         camel-multipart.h                       \
252         camel-net-utils.h                       \
253         camel-network-service.h                 \
254         camel-network-settings.h                \
255         camel-nntp-address.h                    \
256         camel-object-bag.h                      \
257         camel-object.h                          \
258         camel-offline-folder.h                  \
259         camel-offline-journal.h                 \
260         camel-offline-settings.h                \
261         camel-offline-store.h                   \
262         camel-operation.h                       \
263         camel-partition-table.h                 \
264         camel-provider.h                        \
265         camel-sasl-anonymous.h                  \
266         camel-sasl-cram-md5.h                   \
267         camel-sasl-digest-md5.h                 \
268         camel-sasl-gssapi.h                     \
269         camel-sasl-login.h                      \
270         camel-sasl-ntlm.h                       \
271         camel-sasl-plain.h                      \
272         camel-sasl-popb4smtp.h                  \
273         camel-sasl.h                            \
274         camel-search-private.h                  \
275         camel-search-sql-sexp.h                 \
276         camel-search-sql.h                      \
277         camel-service.h                         \
278         camel-session.h                         \
279         camel-settings.h                        \
280         camel-sexp.h                            \
281         camel-smime-context.h                   \
282         camel-store-settings.h                  \
283         camel-store-summary.h                   \
284         camel-store.h                           \
285         camel-stream-buffer.h                   \
286         camel-stream-filter.h                   \
287         camel-stream-fs.h                       \
288         camel-stream-mem.h                      \
289         camel-stream-null.h                     \
290         camel-stream-process.h                  \
291         camel-stream-vfs.h                      \
292         camel-stream.h                          \
293         camel-string-utils.h                    \
294         camel-subscribable.h                    \
295         camel-tcp-stream-raw.h                  \
296         camel-tcp-stream-ssl.h                  \
297         camel-tcp-stream.h                      \
298         camel-text-index.h                      \
299         camel-transport.h                       \
300         camel-trie.h                            \
301         camel-uid-cache.h                       \
302         camel-url-scanner.h                     \
303         camel-url.h                             \
304         camel-utf8.h                            \
305         camel-vee-folder.h                      \
306         camel-vee-store.h                       \
307         camel-vee-summary.h                     \
308         camel-vtrash-folder.h                   \
309         camel-imapx-command.h                   \
310         camel-imapx-conn-manager.h              \
311         camel-imapx-folder.h                    \
312         camel-imapx-job.h                       \
313         camel-imapx-settings.h                  \
314         camel-imapx-server.h                    \
315         camel-imapx-store-summary.h             \
316         camel-imapx-store.h                     \
317         camel-imapx-stream.h                    \
318         camel-imapx-summary.h                   \
319         camel-imapx-utils.h                     \
320         camel.h
321
322 libcamel_1_2_la_LDFLAGS = -version-info $(LIBCAMEL_CURRENT):$(LIBCAMEL_REVISION):$(LIBCAMEL_AGE) $(NO_UNDEFINED) \
323         $(CODE_COVERAGE_LDFLAGS) \
324         $(NULL)
325
326 libcamel_1_2_la_LIBADD =                                \
327         $(CAMEL_LIBS)                                   \
328         $(SOCKET_LIBS)                                  \
329         $(ICONV_LIBS)                                   \
330         $(REGEX_LIBS)
331
332 camel_lock_helper_1_2_CPPFLAGS = \
333         $(AM_CPPFLAGS)                                          \
334         -I$(top_srcdir)                                         \
335         -I$(top_builddir)                                       \
336         -I$(srcdir)                                             \
337         -DCAMEL_LIBEXECDIR=\""$(camellibexecdir)"\"             \
338         -DCAMEL_PROVIDERDIR=\""$(camel_providerdir)"\"          \
339         -DG_LOG_DOMAIN=\"camel\"                                \
340         -DE_DATA_SERVER_PREFIX=\"$(prefix)\"                    \
341         -DLOCALEDIR=\""$(localedir)"\"                          \
342         -DCAMEL_COMPILATION                                     \
343         $(CAMEL_CFLAGS)
344
345 camel_lock_helper_1_2_SOURCES = \
346         camel-lock.c                                    \
347         camel-lock.h                                    \
348         camel-lock-helper.c                     \
349         camel-lock-helper.h
350
351 # NOTE: This needs to be cleaned up, it shouldn't link with all this crap,
352 # because it might be setuid.
353 camel_lock_helper_1_2_LDADD = \
354         $(libcamel_1_2_la_LIBADD)
355
356 camel_index_control_1_2_CPPFLAGS = \
357         $(AM_CPPFLAGS)                                          \
358         -I$(top_srcdir)                                         \
359         -I$(top_builddir)                                       \
360         -I$(srcdir)                                             \
361         -DCAMEL_LIBEXECDIR=\""$(camellibexecdir)"\"             \
362         -DCAMEL_PROVIDERDIR=\""$(camel_providerdir)"\"          \
363         -DG_LOG_DOMAIN=\"camel\"                                \
364         -DE_DATA_SERVER_PREFIX=\"$(prefix)\"                    \
365         -DLOCALEDIR=\""$(localedir)"\"                          \
366         -DCAMEL_COMPILATION                                     \
367         $(CAMEL_CFLAGS)
368
369 camel_index_control_1_2_SOURCES = \
370         camel-index-control.c
371
372 camel_index_control_1_2_LDADD = \
373         libcamel-1.2.la                         \
374         $(libcamel_1_2_la_LIBADD)
375
376 camel-mime-tables.c: $(srcdir)/gentables.pl
377         perl $(srcdir)/gentables.pl > $@
378
379 install-exec-hook:
380         @if test -n "$(CAMEL_LOCK_HELPER_USER)"; then \
381             if test `whoami` = root ; then \
382                 chown $(CAMEL_LOCK_HELPER_USER) $(DESTDIR)$(camellibexecdir)/camel-lock-helper-$(API_VERSION) ; \
383                 chmod u+s $(DESTDIR)$(camellibexecdir)/camel-lock-helper-$(API_VERSION) ; \
384             else \
385                 echo '*** WARNING ***' ; \
386                     echo "Camel will not be able to open mbox files until you perform the following steps:" ; \
387                     echo "    1. Become root" ; \
388                     echo "    2. chown $(CAMEL_LOCK_HELPER_USER) $(DESTDIR)$(sbindir)/camel-lock-helper" ; \
389                     echo "    3. chmod u+s $(DESTDIR)$(sbindir)/camel-lock-helper" ; \
390                     echo '*** WARNING ***' ; \
391             fi \
392         else \
393             echo "No user to chown to"; \
394         fi
395         @if test -n "$(CAMEL_LOCK_HELPER_GROUP)"; then \
396             if test `whoami` = root ; then \
397                 chgrp $(CAMEL_LOCK_HELPER_GROUP) $(DESTDIR)$(camellibexecdir)/camel-lock-helper-$(API_VERSION) ; \
398                     chmod g+s $(DESTDIR)$(camellibexecdir)/camel-lock-helper-$(API_VERSION) ; \
399             else \
400                 echo '*** WARNING ***' ; \
401                     echo "Camel will not be able to open mbox files until you perform the following steps:" ; \
402                     echo "    1. Become root" ; \
403                     echo "    2. chgrp $(CAMEL_LOCK_HELPER_GROUP) $(DESTDIR)$(camellibexecdir)/camel-lock-helper-$(API_VERSION)" ; \
404                     echo "    3. chmod g+s $(DESTDIR)$(camellibexecdir)/camel-lock-helper-$(API_VERSION)" ; \
405                     echo '*** WARNING ***' ; \
406             fi \
407         else \
408             echo "No user to chown to"; \
409         fi
410
411 noinst_HEADERS =                                \
412         camel-charset-map-private.h             \
413         camel-win32.h                           
414
415 BUILT_SOURCES =                                 \
416         camel-mime-tables.c                     \
417         $(ENUM_GENERATED)                       \
418         $(MARSHAL_GENERATED)
419
420 EXTRA_DIST =                                    \
421         $(pkgconfig_in_files)                   \
422         camel-imapx-tokens.txt                  \
423         camel-marshal.list                      \
424         gentables.pl                            \
425         README
426
427 CLEANFILES = $(BUILT_SOURCES)
428 DISTCLEANFILES = $(pkgconfig_DATA)
429
430 -include $(top_srcdir)/git.mk