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