don't leave the user in limbo when privacy system is 'none' and auto signing/encrypti...
[claws.git] / src / Makefile.am
1 # Copyright 1999-2014 the Claws Mail team.
2 # This file is part of Claws Mail package, and distributed under the
3 # terms of the General Public License version 3 (or later).
4 # See COPYING file for license details.
5
6 if CLAWS_LIBETPAN
7 etpan_dir = etpan
8 etpan_library = etpan/libclawsetpan.la
9 else
10 etpan_dir =
11 etpan_library = 
12 endif
13
14 SUBDIRS = common gtk $(etpan_dir) . plugins
15 if BUILD_TESTS
16 include $(top_srcdir)/tests.mk
17 SUBDIRS += tests
18 endif
19
20 bin_PROGRAMS = claws-mail
21 install-exec-hook:
22         @rm -f $(DESTDIR)$(bindir)/sylpheed-claws
23         @ln -s claws-mail $(DESTDIR)$(bindir)/sylpheed-claws
24
25 if PLATFORM_WIN32
26 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
27      `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
28      sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
29
30 %.o : %.rc
31         $(LTRCCOMPILE) -i $< -o $@
32
33 claws_mail_res_ldflag = -Wl,w32-resource.o
34 claws_mail_deps = w32-resource.o
35 else
36 claws_mail_res_ldflag =
37 claws_mail_deps =
38 endif
39
40 alt_abook_source = \
41         addressbook-dbus.c
42 orig_abook_source = \
43         addrbook.c \
44         addrclip.c \
45         addrcustomattr.c \
46         addressbook.c \
47         addressbook_foldersel.c \
48         addrindex.c \
49         addrquery.c \
50         addrselect.c \
51         addrduplicates.c \
52         addrmerge.c \
53         browseldap.c \
54         editaddress.c \
55         editaddress_other_attributes_ldap.c \
56         editbook.c \
57         editgroup.c \
58         editjpilot.c \
59         editldap_basedn.c \
60         editldap.c \
61         editvcard.c \
62         exphtmldlg.c \
63         expldifdlg.c \
64         exporthtml.c \
65         exportldif.c \
66         importldif.c \
67         importmutt.c \
68         importpine.c \
69         jpilot.c \
70         ldapctrl.c \
71         ldaplocate.c \
72         ldapquery.c \
73         ldapserver.c \
74         ldapupdate.c \
75         ldaputil.c \
76         ldif.c \
77         mutt.c \
78         pine.c \
79         vcard.c
80
81 if BUILD_ALTADDRBOOK
82 abook_source = $(alt_abook_source)
83 abook_extra = $(orig_abook_source)
84 else
85 abook_source = $(orig_abook_source)
86 abook_extra = $(alt_abook_source)
87 endif
88
89 abook_headers = \
90         addressbook-dbus.h \
91         adbookbase.h \
92         addrbook.h \
93         addrclip.h \
94         addrcustomattr.h \
95         addressbook.h \
96         addressbook_foldersel.h \
97         addrindex.h \
98         addrquery.h \
99         addrselect.h \
100         addrduplicates.h \
101         addrmerge.h \
102         browseldap.h \
103         editaddress.h \
104         editaddress_other_attributes_ldap.h \
105         editbook.h \
106         editgroup.h \
107         editjpilot.h \
108         editldap_basedn.h \
109         editldap.h \
110         editvcard.h \
111         exphtmldlg.h \
112         expldifdlg.h \
113         exporthtml.h \
114         exportldif.h \
115         file_checker.h \
116         importldif.h \
117         importmutt.h \
118         importpine.h \
119         jpilot.h \
120         ldapctrl.h \
121         ldaplocate.h \
122         ldapquery.h \
123         ldapserver.h \
124         ldapupdate.h \
125         ldaputil.h \
126         ldif.h \
127         mutt.h \
128         pine.h \
129         vcard.h
130
131 claws_mail_SOURCES = \
132         account.c \
133         action.c \
134         addrcache.c \
135         addr_compl.c \
136         addressadd.c \
137         addrgather.c \
138         addrharvest.c \
139         addritem.c \
140         advsearch.c \
141         alertpanel.c \
142         autofaces.c \
143         avatars.c \
144         compose.c \
145         crash.c \
146         customheader.c \
147         displayheader.c \
148         edittags.c \
149         enriched.c \
150         entity.c \
151         export.c \
152         file_checker.c \
153         filtering.c \
154         folder.c \
155         folder_item_prefs.c \
156         foldersel.c \
157         folderutils.c \
158         folderview.c \
159         grouplistdialog.c \
160         headerview.c \
161         html.c \
162         image_viewer.c \
163         imap.c \
164         imap_gtk.c \
165         import.c \
166         inc.c \
167         localfolder.c \
168         main.c \
169         mainwindow.c \
170         manual.c \
171         matcher.c \
172         matcher_parser_lex.l \
173         matcher_parser_parse.y \
174         mbox.c \
175         message_search.c \
176         messageview.c \
177         mh.c \
178         mh_gtk.c \
179         mimeview.c \
180         msgcache.c \
181         news.c \
182         news_gtk.c \
183         noticeview.c \
184         partial_download.c \
185         password.c \
186         password_gtk.c \
187         passwordstore.c \
188         pop.c \
189         prefs_account.c \
190         prefs_actions.c \
191         prefs_common.c \
192         prefs_compose_writing.c \
193         prefs_customheader.c \
194         prefs_display_header.c \
195         prefs_ext_prog.c \
196         prefs_filtering_action.c \
197         prefs_filtering.c \
198         prefs_folder_item.c \
199         prefs_fonts.c \
200         prefs_gtk.c \
201         prefs_image_viewer.c \
202         prefs_logging.c \
203         prefs_matcher.c \
204         prefs_message.c \
205         prefs_migration.c \
206         prefs_msg_colors.c \
207         prefs_other.c \
208         prefs_proxy.c \
209         prefs_quote.c \
210         prefs_receive.c \
211         prefs_send.c \
212         prefs_spelling.c \
213         prefs_summaries.c \
214         prefs_summary_column.c \
215         prefs_summary_open.c \
216         prefs_folder_column.c \
217         prefs_template.c \
218         prefs_themes.c \
219         prefs_toolbar.c \
220         prefs_wrapping.c \
221         printing.c \
222         privacy.c \
223         procheader.c \
224         procmime.c \
225         procmsg.c \
226         quote_fmt.c \
227         quote_fmt_lex.l \
228         quote_fmt_parse.y \
229         recv.c \
230         remotefolder.c \
231         send_message.c \
232         setup.c \
233         sourcewindow.c \
234         ssl_manager.c \
235         statusbar.c \
236         stock_pixmap.c \
237         summary_search.c \
238         summaryview.c \
239         textview.c \
240         toolbar.c \
241         undo.c \
242         uri_opener.c \
243         wizard.c \
244         $(abook_source)
245
246 claws_mailincludedir = $(pkgincludedir)
247 claws_mailinclude_HEADERS = \
248         account.h \
249         action.h \
250         addrcache.h \
251         addr_compl.h \
252         addrdefs.h \
253         addressadd.h \
254         addritem.h \
255         addressitem.h \
256         addrgather.h \
257         addrharvest.h \
258         advsearch.h \
259         alertpanel.h \
260         autofaces.h \
261         avatars.h \
262         compose.h \
263         crash.h \
264         customheader.h \
265         displayheader.h \
266         edittags.h \
267         enriched.h \
268         entity.h \
269         export.h \
270         filtering.h \
271         folder.h \
272         folder_item_prefs.h \
273         foldersel.h \
274         folderutils.h \
275         folderview.h \
276         grouplistdialog.h \
277         headerview.h \
278         html.h \
279         image_viewer.h \
280         imap.h \
281         imap_gtk.h \
282         import.h \
283         inc.h \
284         localfolder.h \
285         main.h \
286         mainwindow.h \
287         manual.h \
288         matcher.h \
289         matchertypes.h \
290         matcher_parser.h \
291         matcher_parser_lex.h \
292         matcher_parser_parse.h \
293         mbox.h \
294         message_search.h \
295         messageview.h \
296         mh.h \
297         mh_gtk.h \
298         mimeview.h \
299         msgcache.h \
300         news.h \
301         news_gtk.h \
302         noticeview.h \
303         partial_download.h \
304         password.h \
305         password_gtk.h \
306         passwordstore.h \
307         pop.h \
308         prefs_account.h \
309         prefs_actions.h \
310         prefs_common.h \
311         prefs_compose_writing.h \
312         prefs_customheader.h \
313         prefs_display_header.h \
314         prefs_ext_prog.h \
315         prefs_filtering_action.h \
316         prefs_filtering.h \
317         prefs_folder_item.h \
318         prefs_fonts.h \
319         prefs_gtk.h \
320         prefs_image_viewer.h \
321         prefs_logging.h \
322         prefs_matcher.h \
323         prefs_message.h \
324         prefs_migration.h \
325         prefs_msg_colors.h \
326         prefs_other.h \
327         prefs_proxy.h \
328         prefs_quote.h \
329         prefs_receive.h \
330         prefs_send.h \
331         prefs_spelling.h \
332         prefs_summaries.h \
333         prefs_summary_column.h \
334         prefs_summary_open.h \
335         prefs_folder_column.h \
336         prefs_template.h \
337         prefs_themes.h \
338         prefs_toolbar.h \
339         prefs_wrapping.h \
340         printing.h \
341         privacy.h \
342         procheader.h \
343         procmime.h \
344         procmsg.h \
345         proctypes.h \
346         quote_fmt.h \
347         quote_fmt_lex.h \
348         quote_fmt_parse.h \
349         recv.h \
350         remotefolder.h \
351         send_message.h \
352         setup.h \
353         sourcewindow.h \
354         ssl_manager.h \
355         statusbar.h \
356         stock_pixmap.h \
357         summary_search.h \
358         summaryview.h \
359         textview.h \
360         toolbar.h \
361         undo.h \
362         uri_opener.h \
363         viewtypes.h \
364         wizard.h \
365         $(abook_headers)
366
367 BUILT_SOURCES = \
368         matcher_parser_parse.h \
369         quote_fmt_parse.h \
370         client-bindings.h
371
372 client-bindings.h: claws-contacts.xml
373 if BUILD_ALTADDRBOOK
374         dbus-binding-tool --prefix=abook --mode=glib-client --output=$@ claws-contacts.xml
375
376 CLEANFILES = \
377              client-bindings.h
378 endif
379
380 EXTRA_DIST = \
381         claws-contacts.xml \
382         w32-logo.ico w32-resource.rc \
383         pixmaps/addr_one.xpm \
384         pixmaps/addr_two.xpm \
385         pixmaps/address_book.xpm \
386         pixmaps/address_search.xpm \
387         pixmaps/address.xpm \
388         pixmaps/anonymous.xpm \
389         pixmaps/book.xpm \
390         pixmaps/cancel.xpm \
391         pixmaps/category.xpm \
392         pixmaps/checkbox_off.xpm \
393         pixmaps/checkbox_on.xpm \
394         pixmaps/check_spelling.xpm \
395         pixmaps/clipkey.xpm \
396         pixmaps/claws_mail_icon.xpm \
397         pixmaps/claws_mail_icon_64.xpm \
398         pixmaps/claws_mail_compose_logo.xpm \
399         pixmaps/claws_mail_logo.xpm \
400         pixmaps/claws_mail_logo_small.xpm \
401         pixmaps/clip.xpm \
402         pixmaps/clip_gpg_signed.xpm \
403         pixmaps/close.xpm \
404         pixmaps/complete.xpm \
405         pixmaps/continue.xpm \
406         pixmaps/copied.xpm \
407         pixmaps/delete_btn.xpm \
408         pixmaps/delete_dup_btn.xpm \
409         pixmaps/deleted.xpm \
410         pixmaps/dir_close.xpm \
411         pixmaps/dir_close_hrm.xpm \
412         pixmaps/dir_close_hrm_mark.xpm \
413         pixmaps/dir_close_mark.xpm \
414         pixmaps/dir_open.xpm \
415         pixmaps/dir_open_hrm.xpm \
416         pixmaps/dir_open_hrm_mark.xpm \
417         pixmaps/dir_open_mark.xpm \
418         pixmaps/dir_noselect_close.xpm \
419         pixmaps/dir_noselect_close_mark.xpm \
420         pixmaps/dir_noselect_open.xpm \
421         pixmaps/dir_subs_close_mark.xpm \
422         pixmaps/dir_subs_close.xpm \
423         pixmaps/dir_subs_open.xpm \
424         pixmaps/doc_index.xpm \
425         pixmaps/doc_index_close.xpm \
426         pixmaps/doc_info.xpm \
427         pixmaps/down_arrow.xpm \
428         pixmaps/drafts_close.xpm \
429         pixmaps/drafts_close_mark.xpm \
430         pixmaps/drafts_open.xpm \
431         pixmaps/drafts_open_mark.xpm \
432         pixmaps/edit_extern.xpm \
433         pixmaps/empty.xpm \
434         pixmaps/error.xpm \
435         pixmaps/exec.xpm \
436         pixmaps/first_arrow.xpm \
437         pixmaps/forwarded.xpm \
438         pixmaps/gpg_signed.xpm \
439         pixmaps/go_folders.xpm \
440         pixmaps/group.xpm \
441         pixmaps/ham_btn.xpm \
442         pixmaps/ignorethread.xpm \
443         pixmaps/inbox_open.xpm \
444         pixmaps/inbox_open_hrm.xpm \
445         pixmaps/inbox_open_hrm_mark.xpm \
446         pixmaps/inbox_open_mark.xpm \
447         pixmaps/inbox_close.xpm \
448         pixmaps/inbox_close_hrm.xpm \
449         pixmaps/inbox_close_hrm_mark.xpm \
450         pixmaps/inbox_close_mark.xpm \
451         pixmaps/interface.xpm \
452         pixmaps/insert_file.xpm \
453         pixmaps/jpilot.xpm \
454         pixmaps/key.xpm \
455         pixmaps/key_gpg_signed.xpm \
456         pixmaps/last_arrow.xpm \
457         pixmaps/ldap.xpm \
458         pixmaps/left_arrow.xpm \
459         pixmaps/linewrap.xpm \
460         pixmaps/linewrapcurrent.xpm \
461         pixmaps/locked.xpm \
462         pixmaps/mail_attach.xpm \
463         pixmaps/mail_compose.xpm \
464         pixmaps/mail_forward.xpm \
465         pixmaps/mail_privacy_encrypted.xpm \
466         pixmaps/mail_privacy_signed.xpm \
467         pixmaps/mail_receive_all.xpm \
468         pixmaps/mail_receive.xpm \
469         pixmaps/mail_reply_to_all.xpm \
470         pixmaps/mail_reply_to_author.xpm \
471         pixmaps/mail_reply_to_list.xpm \
472         pixmaps/mail_reply.xpm \
473         pixmaps/mail_send_queue.xpm \
474         pixmaps/mail_send.xpm \
475         pixmaps/mail_sign.xpm \
476         pixmaps/mail_draft.xpm \
477         pixmaps/mark.xpm \
478         pixmaps/mark_allread.xpm \
479         pixmaps/mark_allunread.xpm \
480         pixmaps/mark_ignorethread.xpm \
481         pixmaps/mark_locked.xpm \
482         pixmaps/mark_mark.xpm \
483         pixmaps/mark_read.xpm \
484         pixmaps/mark_unlocked.xpm \
485         pixmaps/mark_unmark.xpm \
486         pixmaps/mark_unread.xpm \
487         pixmaps/mark_watchthread.xpm \
488         pixmaps/mime_application.xpm \
489         pixmaps/mime_audio.xpm \
490         pixmaps/mime_image.xpm \
491         pixmaps/mime_message.xpm \
492         pixmaps/mime_pdf.xpm \
493         pixmaps/mime_ps.xpm \
494         pixmaps/mime_calendar.xpm \
495         pixmaps/mime_pgpsig.xpm \
496         pixmaps/mime_text_enriched.xpm \
497         pixmaps/mime_text_html.xpm \
498         pixmaps/mime_text_patch.xpm \
499         pixmaps/mime_text_plain.xpm \
500         pixmaps/mime_unknown.xpm \
501         pixmaps/moved.xpm \
502         pixmaps/news_compose.xpm \
503         pixmaps/new.xpm \
504         pixmaps/notice_error.xpm \
505         pixmaps/notice_note.xpm \
506         pixmaps/notice_warn.xpm \
507         pixmaps/offline.xpm \
508         pixmaps/online.xpm \
509         pixmaps/open_mail.xpm \
510         pixmaps/outbox_close.xpm \
511         pixmaps/outbox_close_hrm.xpm \
512         pixmaps/outbox_open.xpm \
513         pixmaps/outbox_open_hrm.xpm \
514         pixmaps/outbox_close_mark.xpm \
515         pixmaps/outbox_close_hrm_mark.xpm \
516         pixmaps/outbox_open_mark.xpm \
517         pixmaps/outbox_open_hrm_mark.xpm \
518         pixmaps/paste.xpm \
519         pixmaps/preferences.xpm \
520         pixmaps/printer.xpm \
521         pixmaps/printer_btn.xpm \
522         pixmaps/privacy_expired.xpm \
523         pixmaps/privacy_failed.xpm \
524         pixmaps/privacy_passed.xpm \
525         pixmaps/privacy_signed.xpm \
526         pixmaps/privacy_unknown.xpm \
527         pixmaps/privacy_warn.xpm \
528         pixmaps/privacy_emblem_encrypted.xpm \
529         pixmaps/privacy_emblem_failed.xpm \
530         pixmaps/privacy_emblem_passed.xpm \
531         pixmaps/privacy_emblem_signed.xpm \
532         pixmaps/privacy_emblem_warn.xpm \
533         pixmaps/properties.xpm \
534         pixmaps/queue_close.xpm \
535         pixmaps/queue_close_hrm.xpm \
536         pixmaps/queue_close_hrm_mark.xpm \
537         pixmaps/queue_close_mark.xpm \
538         pixmaps/queue_open.xpm \
539         pixmaps/queue_open_hrm.xpm \
540         pixmaps/queue_open_hrm_mark.xpm \
541         pixmaps/queue_open_mark.xpm \
542         pixmaps/quicksearch.xpm \
543         pixmaps/replied.xpm \
544         pixmaps/replied_and_forwarded.xpm \
545         pixmaps/right_arrow.xpm \
546         pixmaps/rotate_left.xpm \
547         pixmaps/rotate_right.xpm \
548         pixmaps/selection.xpm \
549         pixmaps/spam.xpm \
550         pixmaps/spam_btn.xpm \
551         pixmaps/trash_btn.xpm \
552         pixmaps/trash_close.xpm \
553         pixmaps/trash_close_hrm.xpm \
554         pixmaps/trash_close_hrm_mark.xpm \
555         pixmaps/trash_close_mark.xpm \
556         pixmaps/trash_open.xpm \
557         pixmaps/trash_open_hrm.xpm \
558         pixmaps/trash_open_hrm_mark.xpm \
559         pixmaps/trash_open_mark.xpm \
560         pixmaps/tray_newmail_offline.xpm \
561         pixmaps/tray_newmail.xpm \
562         pixmaps/tray_newmarkedmail_offline.xpm \
563         pixmaps/tray_newmarkedmail.xpm \
564         pixmaps/tray_nomail_offline.xpm \
565         pixmaps/tray_nomail.xpm \
566         pixmaps/tray_unreadmail_offline.xpm \
567         pixmaps/tray_unreadmail.xpm \
568         pixmaps/tray_unreadmarkedmail_offline.xpm \
569         pixmaps/tray_unreadmarkedmail.xpm \
570         pixmaps/unread.xpm \
571         pixmaps/read.xpm \
572         pixmaps/up_arrow.xpm \
573         pixmaps/vcard.xpm \
574         pixmaps/watchthread.xpm \
575         pixmaps/zoom_fit.xpm \
576         pixmaps/zoom_in.xpm \
577         pixmaps/zoom_out.xpm \
578         pixmaps/zoom_width.xpm \
579         $(abook_extra)
580
581
582 IFLAGS = \
583         -I$(srcdir)/common \
584         -Icommon \
585         -I$(srcdir)/gtk \
586         -I$(srcdir)/etpan
587
588 claws_mail_LDFLAGS = \
589         $(claws_mail_res_ldflag)
590
591 claws_mail_DEPENDENCIES = $(claws_mail_deps) \
592         $(etpan_library) \
593         gtk/libclawsgtk.la
594
595 claws_mail_LDADD = \
596         $(etpan_library) \
597         gtk/libclawsgtk.la \
598         $(ENCHANT_LIBS) \
599         $(INTLLIBS) \
600         $(GTK_LIBS) \
601         $(LDAP_LIBS) \
602         $(GNUTLS_LIBS) \
603         $(NETTLE_LIBS) \
604         $(COMPFACE_LIBS) \
605         $(JPILOT_LIBS) \
606         $(PTHREAD_LIBS) \
607         $(SM_LIBS) \
608         $(LIBICONV) \
609         $(STARTUP_NOTIFICATION_LIBS) \
610         $(LIBETPAN_LIBS) \
611         $(DBUS_LIBS) \
612         $(SVG_LIBS) \
613         $(CONTACTS_LIBS)
614
615 pixmapdir=$(datadir)/icons/hicolor/48x48/apps
616
617 AM_CPPFLAGS = \
618         -DG_LOG_DOMAIN=\"Claws-Mail\" \
619         -DLOCALEDIR=\""$(localedir)"\" \
620         -DPIXMAP_DIR=\""$(pixmapdir)"\" \
621         -DMANUALDIR=\""$(manualdir)"\" \
622         -DTARGET_ALIAS=\""$(target_triplet)"\" \
623         -DSYSCONFDIR=\""$(sysconfdir)"\" \
624         -DDATAROOTDIR=\""$(datarootdir)"\" \
625         $(IFLAGS) \
626         $(ENCHANT_CFLAGS) \
627         $(GTK_CFLAGS) \
628         $(GNUTLS_CFLAGS) \
629         $(GPGME_CFLAGS) \
630         $(LIBETPAN_CPPFLAGS) \
631         $(STARTUP_NOTIFICATION_CFLAGS) \
632         $(DBUS_CFLAGS) \
633         $(SVG_CFLAGS) \
634         $(NETWORKMANAGER_SUPPORT_CFLAGS) \
635         $(VALGRIND_CFLAGS) \
636         $(CONTACTS_CFLAGS)
637
638 #no-unused-function is there because of bison stuff
639 #no-deprecated-declarations because of gpgme_data_rewind, which we have
640 #to call inside gpgme due to our lack of LARGEFILE support
641
642 AM_YFLAGS = -d
643
644 if CYGWIN
645 claws-mail$(EXEEXT): $(claws_mail_OBJECTS) $(claws_mail_DEPENDENCIES) 
646         @rm -f claws-mail$(EXEEXT)
647         @rm -f claws-mail.def claws-mail.base claws-mail.exp libclaws-mail.a .libs/libclaws-mail.a
648         $(LINK) -shared $(claws_mailLDFLAGS) -Wl,--out-implib=libclaws-mail.a -Wl,--export-all-symbols,--exclude-symbols,main $(claws_mail_OBJECTS) -Wl,--no-whole-archive $(claws_mail_LDADD) $(LIBS)
649         dlltool --output-def claws-mail.def --dllname claws-mail$(EXEEXT) --export-all-symbols --exclude-symbols main $(claws_mail_OBJECTS) gtk/.libs/libclawsgtk.a
650         $(LINK) $(claws_mail_LDFLAGS) -Wl,--base-file,claws-mail.base $(claws_mail_OBJECTS) $(claws_mail_LDADD) $(LIBS)
651         sleep 5
652         dlltool --base-file claws-mail.base --input-def claws-mail.def --output-exp claws-mail.exp
653         $(LINK) $(claws_mail_LDFLAGS) -Wl,claws-mail.exp $(claws_mail_OBJECTS) $(claws_mail_LDADD) $(LIBS)
654         @cp libclaws-mail.a .libs/libclaws-mail.a
655 else
656 #claws-mail$(EXEEXT): $(claws_mail_OBJECTS) $(claws_mail_DEPENDENCIES) 
657 #       @rm -f claws-mail$(EXEEXT)
658 #       $(LINK) $(claws_mail_LDFLAGS) $(claws_mail_OBJECTS) $(claws_mail_LDADD) $(LIBS)
659 endif