1a173ee9e69da596e683b4569ca0bebec71daa1f
[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_compose_logo.xpm \
376         pixmaps/claws-mail_logo.xpm \
377         pixmaps/claws-mail_logo-small.xpm \
378         pixmaps/claws-mail.xpm \
379         pixmaps/clip.xpm \
380         pixmaps/clip_gpg_signed.xpm \
381         pixmaps/close.xpm \
382         pixmaps/complete.xpm \
383         pixmaps/continue.xpm \
384         pixmaps/delete_btn.xpm \
385         pixmaps/deleted.xpm \
386         pixmaps/dir_close.xpm \
387         pixmaps/dir_close_hrm.xpm \
388         pixmaps/dir_noselect.xpm \
389         pixmaps/dir_open_hrm.xpm \
390         pixmaps/dir_open.xpm \
391         pixmaps/down_arrow.xpm \
392         pixmaps/drafts_close.xpm \
393         pixmaps/drafts_open.xpm \
394         pixmaps/drafts_close.xpm \
395         pixmaps/drafts_open.xpm \
396         pixmaps/edit_extern.xpm \
397         pixmaps/error.xpm \
398         pixmaps/exec.xpm \
399         pixmaps/forwarded.xpm \
400         pixmaps/gpg_signed.xpm \
401         pixmaps/go_folders.xpm \
402         pixmaps/group.xpm \
403         pixmaps/ham_btn.xpm \
404         pixmaps/ignorethread.xpm \
405         pixmaps/inbox_open_hrm.xpm \
406         pixmaps/inbox_open.xpm \
407         pixmaps/inbox_close_hrm.xpm \
408         pixmaps/inbox_close.xpm \
409         pixmaps/interface.xpm \
410         pixmaps/insert_file.xpm \
411         pixmaps/jpilot.xpm \
412         pixmaps/key.xpm \
413         pixmaps/key_gpg_signed.xpm \
414         pixmaps/ldap.xpm \
415         pixmaps/linewrap.xpm \
416         pixmaps/linewrapcurrent.xpm \
417         pixmaps/locked.xpm \
418         pixmaps/mail_attach.xpm \
419         pixmaps/mail_compose.xpm \
420         pixmaps/mail_forward.xpm \
421         pixmaps/mail_receive_all.xpm \
422         pixmaps/mail_receive.xpm \
423         pixmaps/mail_reply_to_all.xpm \
424         pixmaps/mail_reply_to_author.xpm \
425         pixmaps/mail_reply_to_list.xpm \
426         pixmaps/mail_reply.xpm \
427         pixmaps/mail_send_queue.xpm \
428         pixmaps/mail_send.xpm \
429         pixmaps/mail_sign.xpm \
430         pixmaps/mail.xpm \
431         pixmaps/mark.xpm \
432         pixmaps/mime_application.xpm \
433         pixmaps/mime_audio.xpm \
434         pixmaps/mime_image.xpm \
435         pixmaps/mime_message.xpm \
436         pixmaps/mime_pdf.xpm \
437         pixmaps/mime_ps.xpm \
438         pixmaps/mime_calendar.xpm \
439         pixmaps/mime_pgpsig.xpm \
440         pixmaps/mime_text_enriched.xpm \
441         pixmaps/mime_text_html.xpm \
442         pixmaps/mime_text_patch.xpm \
443         pixmaps/mime_text_plain.xpm \
444         pixmaps/mime_unknown.xpm \
445         pixmaps/news_compose.xpm \
446         pixmaps/new.xpm \
447         pixmaps/notice_error.xpm \
448         pixmaps/notice_note.xpm \
449         pixmaps/notice_warn.xpm \
450         pixmaps/offline.xpm \
451         pixmaps/online.xpm \
452         pixmaps/open_mail.xpm \
453         pixmaps/outbox_close.xpm \
454         pixmaps/outbox_close_hrm.xpm \
455         pixmaps/outbox_open.xpm \
456         pixmaps/outbox_open_hrm.xpm \
457         pixmaps/outbox_close_mark.xpm \
458         pixmaps/outbox_close_hrm_mark.xpm \
459         pixmaps/outbox_open_mark.xpm \
460         pixmaps/outbox_open_hrm_mark.xpm \
461         pixmaps/paste.xpm \
462         pixmaps/preferences.xpm \
463         pixmaps/printer.xpm \
464         pixmaps/privacy_expired.xpm \
465         pixmaps/privacy_failed.xpm \
466         pixmaps/privacy_passed.xpm \
467         pixmaps/privacy_signed.xpm \
468         pixmaps/privacy_unknown.xpm \
469         pixmaps/privacy_warn.xpm \
470         pixmaps/privacy_emblem_encrypted.xpm \
471         pixmaps/privacy_emblem_failed.xpm \
472         pixmaps/privacy_emblem_passed.xpm \
473         pixmaps/privacy_emblem_signed.xpm \
474         pixmaps/privacy_emblem_warn.xpm \
475         pixmaps/properties.xpm \
476         pixmaps/queue_close.xpm \
477         pixmaps/queue_close_hrm.xpm \
478         pixmaps/queue_close_hrm_mark.xpm \
479         pixmaps/queue_close_mark.xpm \
480         pixmaps/queue_open.xpm \
481         pixmaps/queue_open_hrm.xpm \
482         pixmaps/queue_open_hrm_mark.xpm \
483         pixmaps/queue_open_mark.xpm \
484         pixmaps/quicksearch.xpm \
485         pixmaps/replied.xpm \
486         pixmaps/search.xpm \
487         pixmaps/selection.xpm \
488         pixmaps/spam.xpm \
489         pixmaps/spam_btn.xpm \
490         pixmaps/trash_hrm.xpm \
491         pixmaps/trash.xpm \
492         pixmaps/trash_btn.xpm \
493         pixmaps/unread.xpm \
494         pixmaps/read.xpm \
495         pixmaps/up_arrow.xpm \
496         pixmaps/vcard.xpm \
497         pixmaps/dir_close_mark.xpm \
498         pixmaps/dir_close_hrm_mark.xpm \
499         pixmaps/dir_open_hrm_mark.xpm \
500         pixmaps/dir_open_mark.xpm \
501         pixmaps/drafts_close_mark.xpm \
502         pixmaps/drafts_open_mark.xpm \
503         pixmaps/inbox_open_hrm_mark.xpm \
504         pixmaps/inbox_open_mark.xpm \
505         pixmaps/inbox_close_hrm_mark.xpm \
506         pixmaps/inbox_close_mark.xpm \
507         pixmaps/trash_hrm_mark.xpm \
508         pixmaps/trash_mark.xpm \
509         pixmaps/moved.xpm \
510         pixmaps/copied.xpm \
511         pixmaps/watchthread.xpm \
512         pixmaps/tray_newmail.offline.xpm \
513         pixmaps/tray_newmail.xpm \
514         pixmaps/tray_newmarkedmail.offline.xpm \
515         pixmaps/tray_newmarkedmail.xpm \
516         pixmaps/tray_nomail.offline.xpm \
517         pixmaps/tray_nomail.xpm \
518         pixmaps/tray_unreadmail.offline.xpm \
519         pixmaps/tray_unreadmail.xpm \
520         pixmaps/tray_unreadmarkedmail.offline.xpm \
521         pixmaps/tray_unreadmarkedmail.xpm \
522         pixmaps/empty.xpm \
523         pixmaps/replied_and_forwarded.xpm \
524         claws-contacts.xml \
525         $(abook_extra)
526
527
528 INCLUDES = \
529         -I$(srcdir)/common \
530         -Icommon \
531         -I$(srcdir)/gtk \
532         -I$(srcdir)/etpan
533
534 if PLATFORM_WIN32
535 arch_ldflags := -export-all-symbols
536 else
537 arch_ldflags :=
538 endif
539
540 claws_mail_LDFLAGS = \
541         $(arch_ldflags) -export-dynamic $(claws_mail_res_ldflag)
542
543 claws_mail_DEPENDENCIES = $(claws_mail_deps) \
544         $(etpan_library) \
545         gtk/libclawsgtk.la
546
547 claws_mail_LDADD = \
548         $(etpan_library) \
549         gtk/libclawsgtk.la \
550         $(ENCHANT_LIBS) \
551         $(INTLLIBS) \
552         $(GTK_LIBS) \
553         $(GPGME_LIBS) \
554         $(LDAP_LIBS) \
555         $(GNUTLS_LIBS) \
556         $(COMPFACE_LIBS) \
557         $(JPILOT_LIBS) \
558         $(PTHREAD_LIBS) \
559         $(SM_LIBS) \
560         $(LIBICONV) \
561         $(STARTUP_NOTIFICATION_LIBS) \
562         $(LIBETPAN_LIBS) \
563         $(DBUS_LIBS) \
564         $(CONTACTS_LIBS)
565
566 pixmapdir=$(datadir)/icons/hicolor/48x48/apps
567
568 AM_CPPFLAGS = \
569         -DG_LOG_DOMAIN=\"Claws-Mail\" \
570         -DLOCALEDIR=\""$(localedir)"\" \
571         -DPIXMAP_DIR=\""$(pixmapdir)"\" \
572         -DMANUALDIR=\""$(manualdir)"\" \
573         -DFAQDIR=\""$(faqdir)"\" \
574         -DTARGET_ALIAS=\""$(target_triplet)"\" \
575         -DSYSCONFDIR=\""$(sysconfdir)"\" \
576         -DDATAROOTDIR=\""$(datarootdir)"\" \
577         $(ENCHANT_CFLAGS) \
578         $(GTK_CFLAGS) \
579         $(GPGME_CFLAGS) \
580         $(LIBETPAN_CPPFLAGS) \
581         $(STARTUP_NOTIFICATION_CFLAGS) \
582         $(DBUS_CFLAGS) \
583         $(NETWORKMANAGER_SUPPORT_CFLAGS) \
584         $(VALGRIND_CFLAGS) \
585         $(CONTACTS_CFLAGS)
586
587 #no-unused-function is there because of bison stuff
588 #no-deprecated-declarations because of gpgme_data_rewind, which we have
589 #to call inside gpgme due to our lack of LARGEFILE support
590
591 AM_YFLAGS = -d
592
593 if CYGWIN
594 claws-mail$(EXEEXT): $(claws_mail_OBJECTS) $(claws_mail_DEPENDENCIES) 
595         @rm -f claws-mail$(EXEEXT)
596         @rm -f claws-mail.def claws-mail.base claws-mail.exp libclaws-mail.a .libs/libclaws-mail.a
597         $(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)
598         dlltool --output-def claws-mail.def --dllname claws-mail$(EXEEXT) --export-all-symbols --exclude-symbols main $(claws_mail_OBJECTS) gtk/.libs/libclawsgtk.a
599         $(LINK) $(claws_mail_LDFLAGS) -Wl,--base-file,claws-mail.base $(claws_mail_OBJECTS) $(claws_mail_LDADD) $(LIBS)
600         sleep 5
601         dlltool --base-file claws-mail.base --input-def claws-mail.def --output-exp claws-mail.exp
602         $(LINK) $(claws_mail_LDFLAGS) -Wl,claws-mail.exp $(claws_mail_OBJECTS) $(claws_mail_LDADD) $(LIBS)
603         @cp libclaws-mail.a .libs/libclaws-mail.a
604 else
605 #claws-mail$(EXEEXT): $(claws_mail_OBJECTS) $(claws_mail_DEPENDENCIES) 
606 #       @rm -f claws-mail$(EXEEXT)
607 #       $(LINK) $(claws_mail_LDFLAGS) $(claws_mail_OBJECTS) $(claws_mail_LDADD) $(LIBS)
608 endif