fix bug 2979, 'claws fails to load (empty) folderlist.xml and shows account wizard'
[claws.git] / src / Makefile.am
index 6a79e355793084e4c71a5ad97fe0c2a3539c9676..08bc2b381027f99b46e732fa9e736805080aea34 100644 (file)
@@ -7,38 +7,41 @@ etpan_dir =
 etpan_library = 
 endif
 
-SUBDIRS = common gtk $(etpan_dir) . plugins
+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 \
+if PLATFORM_WIN32
+LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
+     `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \
+     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
+
+%.o : %.rc
+       $(LTRCCOMPILE) -i $< -o $@
+
+claws_mail_res_ldflag = -Wl,w32-resource.o
+claws_mail_deps = w32-resource.o
+else
+claws_mail_res_ldflag =
+claws_mail_deps =
+endif
+
+new_abook_source = \
+       addressbook-dbus.c
+old_abook_source = \
        addrbook.c \
-       addrcache.c \
        addrclip.c \
-       addr_compl.c \
        addrcustomattr.c \
-       addressadd.c \
        addressbook.c \
        addressbook_foldersel.c \
-       addrgather.c \
-       addrharvest.c \
        addrindex.c \
-       addritem.c \
        addrquery.c \
        addrselect.c \
        addrduplicates.c \
-       alertpanel.c \
        browseldap.c \
-       codeconv.c \
-       compose.c \
-       crash.c \
-       customheader.c \
-       displayheader.c \
        editaddress.c \
        editaddress_other_attributes_ldap.c \
        editbook.c \
@@ -46,21 +49,102 @@ claws_mail_SOURCES = \
        editjpilot.c \
        editldap_basedn.c \
        editldap.c \
-       edittags.c \
        editvcard.c \
-       enriched.c \
        exphtmldlg.c \
        expldifdlg.c \
-       export.c \
        exporthtml.c \
        exportldif.c \
+       file_checker.c \
+       importldif.c \
+       importmutt.c \
+       importpine.c \
+       jpilot.c \
+       ldapctrl.c \
+       ldaplocate.c \
+       ldapquery.c \
+       ldapserver.c \
+       ldapupdate.c \
+       ldaputil.c \
+       ldif.c \
+       mutt.c \
+       pine.c \
+       vcard.c
+
+if BUILD_NEWADDRBOOK
+abook_source = $(new_abook_source)
+abook_extra = $(old_abook_source)
+else
+abook_source = $(old_abook_source)
+abook_extra = $(new_abook_source)
+endif
+
+abook_headers = \
+       addressbook-dbus.h \
+       adbookbase.h \
+       addrbook.h \
+       addrclip.h \
+       addrcustomattr.h \
+       addressbook.h \
+       addressbook_foldersel.h \
+       addrindex.h \
+       addrquery.h \
+       addrselect.h \
+       addrduplicates.h \
+       browseldap.h \
+       editaddress.h \
+       editaddress_other_attributes_ldap.h \
+       editbook.h \
+       editgroup.h \
+       editjpilot.h \
+       editldap_basedn.h \
+       editldap.h \
+       editvcard.h \
+       exphtmldlg.h \
+       expldifdlg.h \
+       exporthtml.h \
+       exportldif.h \
+       file_checker.h \
+       importldif.h \
+       importmutt.h \
+       importpine.h \
+       jpilot.h \
+       ldapctrl.h \
+       ldaplocate.h \
+       ldapquery.h \
+       ldapserver.h \
+       ldapupdate.h \
+       ldaputil.h \
+       ldif.h \
+       mutt.h \
+       pine.h \
+       vcard.h
+
+claws_mail_SOURCES = \
+       account.c \
+       action.c \
+       addrcache.c \
+       addr_compl.c \
+       addressadd.c \
+       addrgather.c \
+       addrharvest.c \
+       addritem.c \
+       advsearch.c \
+       alertpanel.c \
+       autofaces.c \
+       codeconv.c \
+       compose.c \
+       crash.c \
+       customheader.c \
+       displayheader.c \
+       edittags.c \
+       enriched.c \
+       export.c \
        filtering.c \
        folder.c \
        folder_item_prefs.c \
        foldersel.c \
        folderutils.c \
        folderview.c \
-       gedit-print.c \
        grouplistdialog.c \
        headerview.c \
        html.c \
@@ -68,18 +152,7 @@ claws_mail_SOURCES = \
        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 \
-       ldapupdate.c \
-       ldaputil.c \
-       ldif.c \
        localfolder.c \
        main.c \
        mainwindow.c \
@@ -94,12 +167,10 @@ claws_mail_SOURCES = \
        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 \
@@ -155,60 +226,38 @@ claws_mail_SOURCES = \
        undo.c \
        unmime.c \
        uri_opener.c \
-       vcard.c \
-       wizard.c
+       wizard.c \
+       $(abook_source)
 
 claws_mailincludedir = $(pkgincludedir)
 claws_mailinclude_HEADERS = \
        account.h \
        action.h \
-       adbookbase.h \
-       addrbook.h \
        addrcache.h \
-       addrclip.h \
        addr_compl.h \
        addrdefs.h \
-       addrcustomattr.h \
        addressadd.h \
-       addressbook.h \
-       addressbook_foldersel.h \
+       addritem.h \
        addressitem.h \
        addrgather.h \
        addrharvest.h \
-       addrindex.h \
-       addritem.h \
-       addrquery.h \
-       addrselect.h \
-       addrduplicates.h \
+       advsearch.h \
        alertpanel.h \
-       browseldap.h \
+       autofaces.h \
        codeconv.h \
        compose.h \
        crash.h \
        customheader.h \
        displayheader.h \
-       editaddress.h \
-       editaddress_other_attributes_ldap.h \
-       editbook.h \
-       editgroup.h \
-       editjpilot.h \
-       editldap_basedn.h \
-       editldap.h \
        edittags.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 \
@@ -216,23 +265,13 @@ claws_mailinclude_HEADERS = \
        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 \
-       ldapupdate.h \
-       ldaputil.h \
-       ldif.h \
        localfolder.h \
        main.h \
        mainwindow.h \
        manual.h \
        matcher.h \
+       matchertypes.h \
        matcher_parser.h \
        matcher_parser_lex.h \
        matcher_parser_parse.h \
@@ -243,12 +282,10 @@ claws_mailinclude_HEADERS = \
        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 \
@@ -285,6 +322,7 @@ claws_mailinclude_HEADERS = \
        procheader.h \
        procmime.h \
        procmsg.h \
+       proctypes.h \
        quote_fmt.h \
        quote_fmt_lex.h \
        quote_fmt_parse.h \
@@ -303,14 +341,25 @@ claws_mailinclude_HEADERS = \
        undo.h \
        unmime.h \
        uri_opener.h \
-       vcard.h \
-       wizard.h
+       viewtypes.h \
+       wizard.h \
+       $(abook_headers)
 
 BUILT_SOURCES = \
        matcher_parser_parse.h \
-       quote_fmt_parse.h
+       quote_fmt_parse.h \
+       client-bindings.h
+
+client-bindings.h: claws-contacts.xml
+if BUILD_NEWADDRBOOK
+       dbus-binding-tool --prefix=abook --mode=glib-client --output=$@ claws-contacts.xml
+
+CLEANFILES = \
+            client-bindings.h
+endif
 
 EXTRA_DIST = \
+       w32-logo.ico w32-resource.rc \
        pixmaps/addr_one.xpm \
        pixmaps/addr_two.xpm \
        pixmaps/address_book.xpm \
@@ -318,16 +367,23 @@ EXTRA_DIST = \
        pixmaps/address.xpm \
        pixmaps/anonymous.xpm \
        pixmaps/book.xpm \
+       pixmaps/cancel.xpm \
        pixmaps/category.xpm \
        pixmaps/checkbox_off.xpm \
        pixmaps/checkbox_on.xpm \
        pixmaps/check_spelling.xpm \
        pixmaps/clipkey.xpm \
+       pixmaps/claws-mail_icon.xpm \
+       pixmaps/claws-mail_compose_logo.xpm \
+       pixmaps/claws-mail_logo.xpm \
+       pixmaps/claws-mail_logo-small.xpm \
+       pixmaps/claws-mail.xpm \
        pixmaps/clip.xpm \
        pixmaps/clip_gpg_signed.xpm \
        pixmaps/close.xpm \
        pixmaps/complete.xpm \
        pixmaps/continue.xpm \
+       pixmaps/delete_btn.xpm \
        pixmaps/deleted.xpm \
        pixmaps/dir_close.xpm \
        pixmaps/dir_close_hrm.xpm \
@@ -356,6 +412,7 @@ EXTRA_DIST = \
        pixmaps/insert_file.xpm \
        pixmaps/jpilot.xpm \
        pixmaps/key.xpm \
+       pixmaps/key_gpg_signed.xpm \
        pixmaps/ldap.xpm \
        pixmaps/linewrap.xpm \
        pixmaps/linewrapcurrent.xpm \
@@ -367,6 +424,7 @@ EXTRA_DIST = \
        pixmaps/mail_receive.xpm \
        pixmaps/mail_reply_to_all.xpm \
        pixmaps/mail_reply_to_author.xpm \
+       pixmaps/mail_reply_to_list.xpm \
        pixmaps/mail_reply.xpm \
        pixmaps/mail_send_queue.xpm \
        pixmaps/mail_send.xpm \
@@ -383,6 +441,7 @@ EXTRA_DIST = \
        pixmaps/mime_pgpsig.xpm \
        pixmaps/mime_text_enriched.xpm \
        pixmaps/mime_text_html.xpm \
+       pixmaps/mime_text_patch.xpm \
        pixmaps/mime_text_plain.xpm \
        pixmaps/mime_unknown.xpm \
        pixmaps/news_compose.xpm \
@@ -430,10 +489,6 @@ EXTRA_DIST = \
        pixmaps/selection.xpm \
        pixmaps/spam.xpm \
        pixmaps/spam_btn.xpm \
-       pixmaps/claws-mail_icon.xpm \
-       pixmaps/claws-mail_logo.xpm \
-       pixmaps/claws-mail_logo-small.xpm \
-       pixmaps/claws-mail.xpm \
        pixmaps/trash_hrm.xpm \
        pixmaps/trash.xpm \
        pixmaps/trash_btn.xpm \
@@ -466,7 +521,10 @@ EXTRA_DIST = \
        pixmaps/tray_unreadmail.xpm \
        pixmaps/tray_unreadmarkedmail.offline.xpm \
        pixmaps/tray_unreadmarkedmail.xpm \
-       pixmaps/empty.xpm
+       pixmaps/empty.xpm \
+       pixmaps/replied_and_forwarded.xpm \
+       claws-contacts.xml \
+       $(abook_extra)
 
 
 INCLUDES = \
@@ -482,29 +540,30 @@ arch_ldflags :=
 endif
 
 claws_mail_LDFLAGS = \
-       $(arch_ldflags) -export-dynamic
+       $(arch_ldflags) -export-dynamic $(claws_mail_res_ldflag)
+
+claws_mail_DEPENDENCIES = $(claws_mail_deps) \
+       $(etpan_library) \
+       gtk/libclawsgtk.la
 
 claws_mail_LDADD = \
        $(etpan_library) \
        gtk/libclawsgtk.la \
-       $(ASPELL_LIBS) \
+       $(ENCHANT_LIBS) \
        $(INTLLIBS) \
        $(GTK_LIBS) \
        $(GPGME_LIBS) \
        $(LDAP_LIBS) \
-       $(OPENSSL_LIBS) \
        $(GNUTLS_LIBS) \
        $(COMPFACE_LIBS) \
        $(JPILOT_LIBS) \
        $(PTHREAD_LIBS) \
-       $(GNOMEPRINT_LIBS) \
        $(SM_LIBS) \
        $(LIBICONV) \
        $(STARTUP_NOTIFICATION_LIBS) \
        $(LIBETPAN_LIBS) \
-       $(MAEMO_LIBS) \
-       $(CONIC_LIBS) \
-       $(DBUS_LIBS)
+       $(DBUS_LIBS) \
+       $(CONTACTS_LIBS)
 
 pixmapdir=$(datadir)/icons/hicolor/48x48/apps
 
@@ -517,17 +576,15 @@ AM_CPPFLAGS = \
        -DTARGET_ALIAS=\""$(target_triplet)"\" \
        -DSYSCONFDIR=\""$(sysconfdir)"\" \
        -DDATAROOTDIR=\""$(datarootdir)"\" \
-       $(ASPELL_CFLAGS) \
+       $(ENCHANT_CFLAGS) \
        $(GTK_CFLAGS) \
        $(GPGME_CFLAGS) \
-       $(OPENSSL_CFLAGS) \
-       $(GNOMEPRINT_CFLAGS) \
        $(LIBETPAN_CPPFLAGS) \
        $(STARTUP_NOTIFICATION_CFLAGS) \
-       $(MAEMO_CFLAGS) \
-       $(CONIC_CFLAGS) \
        $(DBUS_CFLAGS) \
-  $(NETWORKMANAGER_SUPPORT_CFLAGS)
+       $(NETWORKMANAGER_SUPPORT_CFLAGS) \
+       $(VALGRIND_CFLAGS) \
+       $(CONTACTS_CFLAGS)
 
 #no-unused-function is there because of bison stuff
 #no-deprecated-declarations because of gpgme_data_rewind, which we have