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