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