2006-12-01 [wwp] 2.6.0cvs77
[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         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/active.xpm \
297         pixmaps/addr_one.xpm \
298         pixmaps/addr_two.xpm \
299         pixmaps/address_book.xpm \
300         pixmaps/address_search.xpm \
301         pixmaps/address.xpm \
302         pixmaps/book.xpm \
303         pixmaps/category.xpm \
304         pixmaps/checkbox_off.xpm \
305         pixmaps/checkbox_on.xpm \
306         pixmaps/check_spelling.xpm \
307         pixmaps/clipkey.xpm \
308         pixmaps/clip.xpm \
309         pixmaps/clip_gpg_signed.xpm \
310         pixmaps/close.xpm \
311         pixmaps/complete.xpm \
312         pixmaps/continue.xpm \
313         pixmaps/deleted.xpm \
314         pixmaps/dir_close.xpm \
315         pixmaps/dir_noselect.xpm \
316         pixmaps/dir_open_hrm.xpm \
317         pixmaps/dir_open.xpm \
318         pixmaps/down_arrow.xpm \
319         pixmaps/drafts_close.xpm \
320         pixmaps/drafts_open.xpm \
321         pixmaps/error.xpm \
322         pixmaps/exec.xpm \
323         pixmaps/forwarded.xpm \
324         pixmaps/gpg_signed.xpm \
325         pixmaps/group.xpm \
326         pixmaps/ham_btn.xpm \
327         pixmaps/ignorethread.xpm \
328         pixmaps/inactive.xpm \
329         pixmaps/inbox_hrm.xpm \
330         pixmaps/inbox.xpm \
331         pixmaps/interface.xpm \
332         pixmaps/jpilot.xpm \
333         pixmaps/key.xpm \
334         pixmaps/ldap.xpm \
335         pixmaps/linewrap.xpm \
336         pixmaps/linewrapcurrent.xpm \
337         pixmaps/locked.xpm \
338         pixmaps/mail_attach.xpm \
339         pixmaps/mail_compose.xpm \
340         pixmaps/mail_forward.xpm \
341         pixmaps/mail_receive_all.xpm \
342         pixmaps/mail_receive.xpm \
343         pixmaps/mail_reply_to_all.xpm \
344         pixmaps/mail_reply_to_author.xpm \
345         pixmaps/mail_reply.xpm \
346         pixmaps/mail_send_queue.xpm \
347         pixmaps/mail_send.xpm \
348         pixmaps/mail.xpm \
349         pixmaps/mark.xpm \
350         pixmaps/mime_application.xpm \
351         pixmaps/mime_audio.xpm \
352         pixmaps/mime_image.xpm \
353         pixmaps/mime_message.xpm \
354         pixmaps/mime_text_enriched.xpm \
355         pixmaps/mime_text_html.xpm \
356         pixmaps/mime_text_plain.xpm \
357         pixmaps/mime_unknown.xpm \
358         pixmaps/news_compose.xpm \
359         pixmaps/new.xpm \
360         pixmaps/notice_error.xpm \
361         pixmaps/notice_note.xpm \
362         pixmaps/notice_warn.xpm \
363         pixmaps/offline.xpm \
364         pixmaps/online.xpm \
365         pixmaps/outbox_hrm.xpm \
366         pixmaps/outbox.xpm \
367         pixmaps/paste.xpm \
368         pixmaps/preferences.xpm \
369         pixmaps/privacy_expired.xpm \
370         pixmaps/privacy_failed.xpm \
371         pixmaps/privacy_passed.xpm \
372         pixmaps/privacy_signed.xpm \
373         pixmaps/privacy_unknown.xpm \
374         pixmaps/privacy_warn.xpm \
375         pixmaps/privacy_emblem_encrypted.xpm \
376         pixmaps/privacy_emblem_failed.xpm \
377         pixmaps/privacy_emblem_passed.xpm \
378         pixmaps/privacy_emblem_signed.xpm \
379         pixmaps/privacy_emblem_warn.xpm \
380         pixmaps/properties.xpm \
381         pixmaps/quicksearch.xpm \
382         pixmaps/replied.xpm \
383         pixmaps/search.xpm \
384         pixmaps/spam.xpm \
385         pixmaps/spam_btn.xpm \
386         pixmaps/claws-mail_icon.xpm \
387         pixmaps/claws-mail_logo.xpm \
388         pixmaps/claws-mail.xpm \
389         pixmaps/trash_hrm.xpm \
390         pixmaps/trash.xpm \
391         pixmaps/trash_btn.xpm \
392         pixmaps/unread.xpm \
393         pixmaps/read.xpm \
394         pixmaps/up_arrow.xpm \
395         pixmaps/vcard.xpm \
396         pixmaps/dir_close_mark.xpm \
397         pixmaps/dir_open_hrm_mark.xpm \
398         pixmaps/dir_open_mark.xpm \
399         pixmaps/drafts_close_mark.xpm \
400         pixmaps/drafts_open_mark.xpm \
401         pixmaps/inbox_hrm_mark.xpm \
402         pixmaps/inbox_mark.xpm \
403         pixmaps/outbox_hrm_mark.xpm \
404         pixmaps/outbox_mark.xpm \
405         pixmaps/trash_hrm_mark.xpm \
406         pixmaps/trash_mark.xpm \
407         pixmaps/moved.xpm \
408         pixmaps/copied.xpm \
409         pixmaps/empty.xpm
410
411
412 INCLUDES = \
413         -I$(srcdir)/common \
414         -I$(srcdir)/gtk \
415         -I$(srcdir)/etpan
416
417 if PLATFORM_WIN32
418 arch_ldflags := -export-all-symbols
419 else
420 arch_ldflags :=
421 endif
422
423 claws_mail_LDFLAGS = \
424         $(arch_ldflags) -export-dynamic
425
426 claws_mail_LDADD = \
427         $(etpan_library) \
428         gtk/libclawsgtk.la \
429         $(ASPELL_LIBS) \
430         $(INTLLIBS) \
431         $(GTK_LIBS) \
432         $(GPGME_LIBS) \
433         $(LDAP_LIBS) \
434         $(OPENSSL_LIBS) \
435         $(COMPFACE_LIBS) \
436         $(JPILOT_LIBS) \
437         $(PTHREAD_LIBS) \
438         $(GNOMEPRINT_LIBS) \
439         $(SM_LIBS) \
440         $(LIBICONV) \
441         $(STARTUP_NOTIFICATION_LIBS) \
442         $(LIBETPAN_LIBS)
443
444 AM_CPPFLAGS = \
445         -DG_LOG_DOMAIN=\"Claws-Mail\" \
446         -DLOCALEDIR=\""$(localedir)"\" \
447         -DMANUALDIR=\""$(manualdir)"\" \
448         -DFAQDIR=\""$(faqdir)"\" \
449         -DTARGET_ALIAS=\""$(target_triplet)"\" \
450         -DSYSCONFDIR=\""$(sysconfdir)"\" \
451         $(ASPELL_CFLAGS) \
452         $(GTK_CFLAGS) \
453         $(GPGME_CFLAGS) \
454         $(OPENSSL_CFLAGS) \
455         $(GNOMEPRINT_CFLAGS) \
456         $(LIBETPAN_CPPFLAGS) \
457         $(STARTUP_NOTIFICATION_CFLAGS) \
458         -Wno-unused-function
459          
460 #no-unused-function is there because of bison stuff
461 #no-deprecated-declarations because of gpgme_data_rewind, which we have
462 #to call inside gpgme due to our lack of LARGEFILE support
463
464 AM_YFLAGS = -d
465
466 if CYGWIN
467 claws-mail$(EXEEXT): $(claws_mail_OBJECTS) $(claws_mail_DEPENDENCIES) 
468         @rm -f claws-mail$(EXEEXT)
469         @rm -f claws-mail.def claws-mail.base claws-mail.exp libclaws-mail.a .libs/libclaws-mail.a
470         $(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)
471         dlltool --output-def claws-mail.def --dllname claws-mail$(EXEEXT) --export-all-symbols --exclude-symbols main $(claws_mail_OBJECTS) gtk/.libs/libclawsgtk.a
472         $(LINK) $(claws_mail_LDFLAGS) -Wl,--base-file,claws-mail.base $(claws_mail_OBJECTS) $(claws_mail_LDADD) $(LIBS)
473         sleep 5
474         dlltool --base-file claws-mail.base --input-def claws-mail.def --output-exp claws-mail.exp
475         $(LINK) $(claws_mail_LDFLAGS) -Wl,claws-mail.exp $(claws_mail_OBJECTS) $(claws_mail_LDADD) $(LIBS)
476         @cp libclaws-mail.a .libs/libclaws-mail.a
477 else
478 #claws-mail$(EXEEXT): $(claws_mail_OBJECTS) $(claws_mail_DEPENDENCIES) 
479 #       @rm -f claws-mail$(EXEEXT)
480 #       $(LINK) $(claws_mail_LDFLAGS) $(claws_mail_OBJECTS) $(claws_mail_LDADD) $(LIBS)
481 endif