2007-02-20 [colin] 2.7.2cvs58
[claws.git] / src / Makefile.am
index e677a5f73838bdd94349a751a31c49024e8ac54c..c3e85f5c2901c248695d4a4b6a20b8128ee8d5b8 100644 (file)
-SUBDIRS = common gtk
 
-bin_PROGRAMS = sylpheed
+if CLAWS_LIBETPAN
+etpan_dir = etpan
+etpan_library = etpan/libclawsetpan.la
+else
+etpan_dir =
+etpan_library = 
+endif
 
-sylpheed_SOURCES = \
-       main.c main.h \
-       mainwindow.c mainwindow.h \
-       folderview.c folderview.h \
-       summaryview.c summaryview.h \
-       messageview.c messageview.h \
-       headerview.c headerview.h \
-       textview.c textview.h \
-       imageview.c imageview.h \
-       mimeview.c mimeview.h \
-       summary_search.c summary_search.h \
-       message_search.c message_search.h \
-       colorlabel.c colorlabel.h \
-       folder.c folder.h \
-       procmsg.c procmsg.h \
-       procheader.c procheader.h \
-       compose.c compose.h \
-       menu.c menu.h \
-       stock_pixmap.c stock_pixmap.h \
-       prefs_gtk.c prefs_gtk.h \
-       prefs_common.c prefs_common.h \
-       prefs_account.c prefs_account.h \
-       prefs_folder_item.c prefs_folder_item.h \
-       prefs_display_header.c prefs_display_header.h \
-       prefs_customheader.c prefs_customheader.h \
-       prefs_summary_column.c prefs_summary_column.h \
-       prefs_template.c prefs_template.h \
-       prefs_actions.c prefs_actions.h \
-       account.c account.h \
-       displayheader.c displayheader.h \
-       customheader.c customheader.h \
-       addressbook.c addressbook.h \
-       addr_compl.c addr_compl.h \
-       addressitem.h \
-       adbookbase.h \
-       addritem.c addritem.h \
-       addrcache.c addrcache.h \
-       addrclip.c addrclip.h \
-       addrselect.c addrselect.h \
-       addrbook.c addrbook.h \
-       addrindex.c addrindex.h \
-       mgutils.c mgutils.h \
-       vcard.c vcard.h \
-       ldif.c ldif.h \
-       importldif.c importldif.h \
-       mutt.c mutt.h \
-       importmutt.c importmutt.h \
-       pine.c pine.h \
-       importpine.c importpine.h \
-       jpilot.c jpilot.h \
-       syldap.c syldap.h \
-       editbook.c editbook.h \
-       editgroup.c editgroup.h \
-       editaddress.c editaddress.h \
-       editvcard.c editvcard.h \
-       editjpilot.c editjpilot.h \
-       editldap.c editldap.h \
-       editldap_basedn.c editldap_basedn.h \
-       addressadd.c addressadd.h \
-       addrharvest.c addrharvest.h \
-       addrgather.c addrgather.h \
-       exporthtml.c exporthtml.h \
-       exphtmldlg.c exphtmldlg.h \
-       xmlprops.c xmlprops.h \
-       filesel.c filesel.h \
-       foldersel.c foldersel.h \
-       statusbar.c statusbar.h \
-       logwindow.c logwindow.h \
-       sourcewindow.c sourcewindow.h \
-       undo.c undo.h \
-       alertpanel.c alertpanel.h \
-       inputdialog.c inputdialog.h \
-       progressdialog.c progressdialog.h \
-       grouplistdialog.c grouplistdialog.h \
-       about.c about.h \
-       setup.c setup.h \
-       gtkutils.c gtkutils.h \
-       codeconv.c codeconv.h \
-       unmime.c unmime.h \
-       ssl_manager.c ssl_manager.h \
-       automaton.c automaton.h \
-       pop.c pop.h \
-       mh.c mh.h \
-       mbox.c mbox.h \
-       send.c send.h \
-       recv.c recv.h \
-       inc.c inc.h \
-       import.c import.h \
-       export.c export.h \
-       news.c news.h \
-       imap.c imap.h \
-       xml.c xml.h \
-       html.c html.h \
-       enriched.c enriched.h \
-       procmime.c procmime.h \
-       rfc2015.c rfc2015.h \
-       passphrase.c passphrase.h \
-       pgptext.c pgptext.h \
-       select-keys.c select-keys.h \
-       sigstatus.c sigstatus.h \
+SUBDIRS = common gtk $(etpan_dir) . plugins
+
+bin_PROGRAMS = claws-mail
+install-exec-hook:
+       @rm -f $(DESTDIR)$(bindir)/sylpheed-claws
+       @ln -s claws-mail $(DESTDIR)$(bindir)/sylpheed-claws
+
+claws_mail_SOURCES = \
+       account.c \
+       action.c \
+       addrbook.c \
+       addrcache.c \
+       addrclip.c \
+       addr_compl.c \
+       addressadd.c \
+       addressbook.c \
+       addressbook_foldersel.c \
+       addrgather.c \
+       addrharvest.c \
+       addrindex.c \
+       addritem.c \
+       addrquery.c \
+       addrselect.c \
+       alertpanel.c \
+       browseldap.c \
+       codeconv.c \
+       compose.c \
+       crash.c \
+       customheader.c \
+       displayheader.c \
+       editaddress.c \
+       editbook.c \
+       editgroup.c \
+       editjpilot.c \
+       editldap_basedn.c \
+       editldap.c \
+       editvcard.c \
+       enriched.c \
+       exphtmldlg.c \
+       expldifdlg.c \
+       export.c \
+       exporthtml.c \
+       exportldif.c \
+       filtering.c \
+       folder.c \
+       folder_item_prefs.c \
+       foldersel.c \
+       folderutils.c \
+       folderview.c \
+       gedit-print.c \
+       grouplistdialog.c \
+       headerview.c \
+       html.c \
+       image_viewer.c \
+       imap.c \
+       imap_gtk.c \
+       import.c \
+       importldif.c \
+       importmutt.c \
+       importpine.c \
+       inc.c \
+       jpilot.c \
+       ldapctrl.c \
+       ldaplocate.c \
+       ldapquery.c \
+       ldapserver.c \
+       ldaputil.c \
+       ldif.c \
+       localfolder.c \
+       main.c \
+       mainwindow.c \
+       manual.c \
+       matcher.c \
+       matcher_parser_lex.l \
+       matcher_parser_parse.y \
+       mbox.c \
+       message_search.c \
+       messageview.c \
+       mh.c \
+       mh_gtk.c \
+       mimeview.c \
+       msgcache.c \
+       mutt.c \
+       news.c \
+       news_gtk.c \
+       noticeview.c \
+       partial_download.c \
+       pine.c \
+       pop.c \
+       prefs_account.c \
+       prefs_actions.c \
+       prefs_common.c \
+       prefs_compose_writing.c \
+       prefs_customheader.c \
+       prefs_display_header.c \
+       prefs_ext_prog.c \
+       prefs_filtering_action.c \
+       prefs_filtering.c \
+       prefs_folder_item.c \
+       prefs_fonts.c \
+       prefs_gtk.c \
+       prefs_image_viewer.c \
+       prefs_matcher.c \
+       prefs_message.c \
+       prefs_msg_colors.c \
+       prefs_other.c \
+       prefs_quote.c \
+       prefs_receive.c \
+       prefs_send.c \
+       prefs_spelling.c \
+       prefs_summaries.c \
+       prefs_summary_column.c \
+       prefs_folder_column.c \
+       prefs_template.c \
+       prefs_themes.c \
+       prefs_toolbar.c \
+       prefs_wrapping.c \
+       privacy.c \
+       procheader.c \
+       procmime.c \
+       procmsg.c \
+       quote_fmt.c \
+       quote_fmt_lex.l \
+       quote_fmt_parse.y \
+       recv.c \
+       remotefolder.c \
+       send_message.c \
+       setup.c \
        simple-gettext.c \
-       manual.c manual.h \
-       stringtable.c stringtable.h \
-       scoring.c scoring.h \
-       matcher.c matcher.h \
-       prefs_matcher.c prefs_matcher.h \
-       prefs_scoring.c prefs_scoring.h \
-       filtering.c filtering.h \
-       prefs_filtering.c prefs_filtering.h \
-       mbox_folder.c mbox_folder.h \
-       quote_fmt_lex.l quote_fmt_lex.h \
-       quote_fmt_parse.y quote_fmt.c quote_fmt.h \
-       gtkaspell.c gtkaspell.h gtkxtext.h \
-       matcher_parser_lex.l matcher_parser_lex.h \
-       matcher_parser_parse.y matcher_parser.h matcher_parser_parse.h \
-       string_match.h string_match.c \
-       selective_download.c selective_download.h \
-       msgcache.h msgcache.c \
-       noticeview.h noticeview.c \
-       toolbar.c toolbar.h \
-       prefs_toolbar.c prefs_toolbar.h \
-       crash.c crash.h
+       sourcewindow.c \
+       ssl_manager.c \
+       statusbar.c \
+       stock_pixmap.c \
+       summary_search.c \
+       summaryview.c \
+       textview.c \
+       toolbar.c \
+       undo.c \
+       unmime.c \
+       uri_opener.c \
+       vcard.c \
+       wizard.c
 
-BUILT_SOURCES = \
-       quote_fmt_lex.c \
-       quote_fmt_parse.c \
+claws_mailincludedir = $(pkgincludedir)
+claws_mailinclude_HEADERS = \
+       account.h \
+       action.h \
+       adbookbase.h \
+       addrbook.h \
+       addrcache.h \
+       addrclip.h \
+       addr_compl.h \
+       addrdefs.h \
+       addressadd.h \
+       addressbook.h \
+       addressbook_foldersel.h \
+       addressitem.h \
+       addrgather.h \
+       addrharvest.h \
+       addrindex.h \
+       addritem.h \
+       addrquery.h \
+       addrselect.h \
+       alertpanel.h \
+       browseldap.h \
+       codeconv.h \
+       compose.h \
+       crash.h \
+       customheader.h \
+       displayheader.h \
+       editaddress.h \
+       editbook.h \
+       editgroup.h \
+       editjpilot.h \
+       editldap_basedn.h \
+       editldap.h \
+       editvcard.h \
+       enriched.h \
+       exphtmldlg.h \
+       expldifdlg.h \
+       export.h \
+       exporthtml.h \
+       exportldif.h \
+       filtering.h \
+       folder.h \
+       folder_item_prefs.h \
+       foldersel.h \
+       folderutils.h \
+       folderview.h \
+       gedit-print.h \
+       grouplistdialog.h \
+       headerview.h \
+       html.h \
+       image_viewer.h \
+       imap.h \
+       imap_gtk.h \
+       import.h \
+       importldif.h \
+       importmutt.h \
+       importpine.h \
+       inc.h \
+       jpilot.h \
+       ldapctrl.h \
+       ldaplocate.h \
+       ldapquery.h \
+       ldapserver.h \
+       ldaputil.h \
+       ldif.h \
+       localfolder.h \
+       main.h \
+       mainwindow.h \
+       manual.h \
+       matcher.h \
+       matcher_parser.h \
+       matcher_parser_lex.h \
+       matcher_parser_parse.h \
+       mbox.h \
+       message_search.h \
+       messageview.h \
+       mh.h \
+       mh_gtk.h \
+       mimeview.h \
+       msgcache.h \
+       mutt.h \
+       news.h \
+       news_gtk.h \
+       noticeview.h \
+       partial_download.h \
+       pine.h \
+       pop.h \
+       prefs_account.h \
+       prefs_actions.h \
+       prefs_common.h \
+       prefs_compose_writing.h \
+       prefs_customheader.h \
+       prefs_display_header.h \
+       prefs_ext_prog.h \
+       prefs_filtering_action.h \
+       prefs_filtering.h \
+       prefs_folder_item.h \
+       prefs_fonts.h \
+       prefs_gtk.h \
+       prefs_image_viewer.h \
+       prefs_matcher.h \
+       prefs_message.h \
+       prefs_msg_colors.h \
+       prefs_other.h \
+       prefs_quote.h \
+       prefs_receive.h \
+       prefs_send.h \
+       prefs_spelling.h \
+       prefs_summaries.h \
+       prefs_summary_column.h \
+       prefs_folder_column.h \
+       prefs_template.h \
+       prefs_themes.h \
+       prefs_toolbar.h \
+       prefs_wrapping.h \
+       privacy.h \
+       procheader.h \
+       procmime.h \
+       procmsg.h \
+       quote_fmt.h \
+       quote_fmt_lex.h \
        quote_fmt_parse.h \
-       matcher_parser_lex.c \
-       matcher_parser_parse.c \
-       matcher_parser_parse.h
+       recv.h \
+       remotefolder.h \
+       send_message.h \
+       setup.h \
+       sourcewindow.h \
+       ssl_manager.h \
+       statusbar.h \
+       stock_pixmap.h \
+       summary_search.h \
+       summaryview.h \
+       textview.h \
+       toolbar.h \
+       undo.h \
+       unmime.h \
+       uri_opener.h \
+       vcard.h \
+       wizard.h
+
+BUILT_SOURCES = \
+       matcher_parser_parse.h \
+       quote_fmt_parse.h
 
 EXTRA_DIST = \
-       quote_fmt_parse.h \
-       version.h.in \
+       pixmaps/active.xpm \
+       pixmaps/addr_one.xpm \
+       pixmaps/addr_two.xpm \
        pixmaps/address_book.xpm \
+       pixmaps/address_search.xpm \
        pixmaps/address.xpm \
        pixmaps/book.xpm \
        pixmaps/category.xpm \
        pixmaps/checkbox_off.xpm \
        pixmaps/checkbox_on.xpm \
-       pixmaps/clip.xpm \
+       pixmaps/check_spelling.xpm \
        pixmaps/clipkey.xpm \
+       pixmaps/clip.xpm \
+       pixmaps/clip_gpg_signed.xpm \
        pixmaps/close.xpm \
        pixmaps/complete.xpm \
        pixmaps/continue.xpm \
        pixmaps/deleted.xpm \
        pixmaps/dir_close.xpm \
+       pixmaps/dir_noselect.xpm \
+        pixmaps/dir_open_hrm.xpm \
        pixmaps/dir_open.xpm \
-       pixmaps/dir_open_hrm.xpm \
        pixmaps/down_arrow.xpm \
+       pixmaps/drafts_close.xpm \
+       pixmaps/drafts_open.xpm \
        pixmaps/error.xpm \
        pixmaps/exec.xpm \
-       pixmaps/folder.xpm \
        pixmaps/forwarded.xpm \
+       pixmaps/gpg_signed.xpm \
        pixmaps/group.xpm \
+       pixmaps/ham_btn.xpm \
        pixmaps/ignorethread.xpm \
-       pixmaps/inbox.xpm \
+       pixmaps/inactive.xpm \
        pixmaps/inbox_hrm.xpm \
+       pixmaps/inbox.xpm \
        pixmaps/interface.xpm \
        pixmaps/jpilot.xpm \
        pixmaps/key.xpm \
        pixmaps/ldap.xpm \
        pixmaps/linewrap.xpm \
+       pixmaps/linewrapcurrent.xpm \
        pixmaps/locked.xpm \
-       pixmaps/mail.xpm \
        pixmaps/mail_attach.xpm \
        pixmaps/mail_compose.xpm \
        pixmaps/mail_forward.xpm \
-       pixmaps/mail_receive.xpm \
        pixmaps/mail_receive_all.xpm \
-       pixmaps/mail_reply.xpm \
+       pixmaps/mail_receive.xpm \
        pixmaps/mail_reply_to_all.xpm \
        pixmaps/mail_reply_to_author.xpm \
-       pixmaps/mail_send.xpm \
+       pixmaps/mail_reply.xpm \
        pixmaps/mail_send_queue.xpm \
+       pixmaps/mail_send.xpm \
+       pixmaps/mail.xpm \
        pixmaps/mark.xpm \
-       pixmaps/new.xpm \
+       pixmaps/mime_application.xpm \
+       pixmaps/mime_audio.xpm \
+       pixmaps/mime_image.xpm \
+       pixmaps/mime_message.xpm \
+       pixmaps/mime_pdf.xpm \
+       pixmaps/mime_ps.xpm \
+       pixmaps/mime_calendar.xpm \
+       pixmaps/mime_pgpsig.xpm \
+       pixmaps/mime_text_enriched.xpm \
+       pixmaps/mime_text_html.xpm \
+       pixmaps/mime_text_plain.xpm \
+       pixmaps/mime_unknown.xpm \
        pixmaps/news_compose.xpm \
-       pixmaps/outbox.xpm \
+       pixmaps/new.xpm \
+       pixmaps/notice_error.xpm \
+       pixmaps/notice_note.xpm \
+       pixmaps/notice_warn.xpm \
+       pixmaps/offline.xpm \
+       pixmaps/online.xpm \
        pixmaps/outbox_hrm.xpm \
+       pixmaps/outbox.xpm \
        pixmaps/paste.xpm \
        pixmaps/preferences.xpm \
+       pixmaps/privacy_expired.xpm \
+       pixmaps/privacy_failed.xpm \
+       pixmaps/privacy_passed.xpm \
+       pixmaps/privacy_signed.xpm \
+       pixmaps/privacy_unknown.xpm \
+       pixmaps/privacy_warn.xpm \
+       pixmaps/privacy_emblem_encrypted.xpm \
+       pixmaps/privacy_emblem_failed.xpm \
+       pixmaps/privacy_emblem_passed.xpm \
+       pixmaps/privacy_emblem_signed.xpm \
+       pixmaps/privacy_emblem_warn.xpm \
        pixmaps/properties.xpm \
-       pixmaps/regular.xpm \
+       pixmaps/quicksearch.xpm \
        pixmaps/replied.xpm \
        pixmaps/search.xpm \
-       pixmaps/sylpheed.xpm \
-       pixmaps/sylpheed_logo.xpm \
-       pixmaps/trash.xpm \
+       pixmaps/spam.xpm \
+       pixmaps/spam_btn.xpm \
+       pixmaps/claws-mail_icon.xpm \
+       pixmaps/claws-mail_logo.xpm \
+       pixmaps/claws-mail.xpm \
        pixmaps/trash_hrm.xpm \
+       pixmaps/trash.xpm \
+       pixmaps/trash_btn.xpm \
        pixmaps/unread.xpm \
+       pixmaps/read.xpm \
        pixmaps/up_arrow.xpm \
        pixmaps/vcard.xpm \
-       pixmaps/work_offline.xpm \
-       pixmaps/work_online.xpm \
-       pixmaps/notice_warn.xpm \
-       pixmaps/notice_error.xpm \
-       pixmaps/notice_note.xpm \
-       pixmaps/quicksearch.xpm
+       pixmaps/dir_close_mark.xpm \
+       pixmaps/dir_open_hrm_mark.xpm \
+       pixmaps/dir_open_mark.xpm \
+       pixmaps/drafts_close_mark.xpm \
+       pixmaps/drafts_open_mark.xpm \
+       pixmaps/inbox_hrm_mark.xpm \
+       pixmaps/inbox_mark.xpm \
+       pixmaps/outbox_hrm_mark.xpm \
+       pixmaps/outbox_mark.xpm \
+       pixmaps/trash_hrm_mark.xpm \
+       pixmaps/trash_mark.xpm \
+       pixmaps/moved.xpm \
+       pixmaps/copied.xpm \
+       pixmaps/empty.xpm
+
 
 INCLUDES = \
-       -Icommon \
-       -Igtk \
-       -DG_LOG_DOMAIN=\"Sylpheed\" \
-       -I$(top_srcdir)/intl \
-        $(ASPELL_CFLAGS)    \
-       $(GTK_CFLAGS) \
-       $(GDK_IMLIB_CFLAGS) \
-       $(GDK_PIXBUF_CFLAGS) \
-       $(GPGME_CFLAGS) \
-       $(OPENSSL_CFLAGS) \
-       -I$(includedir)
+       -I$(srcdir)/common \
+       -I$(srcdir)/gtk \
+       -I$(srcdir)/etpan
 
-sylpheed_LDADD = \
-       gtk/libsylpheedgtk.la \
-       $(INTLLIBS) \
+if PLATFORM_WIN32
+arch_ldflags := -export-all-symbols
+else
+arch_ldflags :=
+endif
+
+claws_mail_LDFLAGS = \
+       $(arch_ldflags) -export-dynamic
+
+claws_mail_LDADD = \
+       $(etpan_library) \
+       gtk/libclawsgtk.la \
        $(ASPELL_LIBS) \
+       $(INTLLIBS) \
        $(GTK_LIBS) \
-       $(GDK_IMLIB_LIBS) \
-       $(GDK_PIXBUF_LIBS) \
        $(GPGME_LIBS) \
        $(LDAP_LIBS) \
-       $(OPENSSL_LIBS)
+       $(OPENSSL_LIBS) \
+       $(COMPFACE_LIBS) \
+       $(JPILOT_LIBS) \
+       $(PTHREAD_LIBS) \
+       $(GNOMEPRINT_LIBS) \
+       $(SM_LIBS) \
+       $(LIBICONV) \
+       $(STARTUP_NOTIFICATION_LIBS) \
+       $(LIBETPAN_LIBS)
 
-CPPFLAGS = \
+AM_CPPFLAGS = \
+       -DG_LOG_DOMAIN=\"Claws-Mail\" \
        -DLOCALEDIR=\""$(localedir)"\" \
        -DMANUALDIR=\""$(manualdir)"\" \
        -DFAQDIR=\""$(faqdir)"\" \
        -DTARGET_ALIAS=\""$(target_triplet)"\" \
-       -DSYSCONFDIR=\""$(sysconfdir)"\"
+       -DSYSCONFDIR=\""$(sysconfdir)"\" \
+       $(ASPELL_CFLAGS) \
+       $(GTK_CFLAGS) \
+       $(GPGME_CFLAGS) \
+       $(OPENSSL_CFLAGS) \
+       $(GNOMEPRINT_CFLAGS) \
+       $(LIBETPAN_CPPFLAGS) \
+       $(STARTUP_NOTIFICATION_CFLAGS) \
+       -Wno-unused-function
+        
+#no-unused-function is there because of bison stuff
+#no-deprecated-declarations because of gpgme_data_rewind, which we have
+#to call inside gpgme due to our lack of LARGEFILE support
+
+AM_YFLAGS = -d
 
-YFLAGS = -d
+if CYGWIN
+claws-mail$(EXEEXT): $(claws_mail_OBJECTS) $(claws_mail_DEPENDENCIES) 
+       @rm -f claws-mail$(EXEEXT)
+       @rm -f claws-mail.def claws-mail.base claws-mail.exp libclaws-mail.a .libs/libclaws-mail.a
+       $(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)
+       dlltool --output-def claws-mail.def --dllname claws-mail$(EXEEXT) --export-all-symbols --exclude-symbols main $(claws_mail_OBJECTS) gtk/.libs/libclawsgtk.a
+       $(LINK) $(claws_mail_LDFLAGS) -Wl,--base-file,claws-mail.base $(claws_mail_OBJECTS) $(claws_mail_LDADD) $(LIBS)
+       sleep 5
+       dlltool --base-file claws-mail.base --input-def claws-mail.def --output-exp claws-mail.exp
+       $(LINK) $(claws_mail_LDFLAGS) -Wl,claws-mail.exp $(claws_mail_OBJECTS) $(claws_mail_LDADD) $(LIBS)
+       @cp libclaws-mail.a .libs/libclaws-mail.a
+else
+#claws-mail$(EXEEXT): $(claws_mail_OBJECTS) $(claws_mail_DEPENDENCIES) 
+#      @rm -f claws-mail$(EXEEXT)
+#      $(LINK) $(claws_mail_LDFLAGS) $(claws_mail_OBJECTS) $(claws_mail_LDADD) $(LIBS)
+endif