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