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