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