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