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