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