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