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