always build POP support, we do a /mail/ client, right ?
[apps/madmutt.git] / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 ## Use aclocal -I m4; automake --foreign
3
4 AUTOMAKE_OPTIONS = foreign
5 EXTRA_PROGRAMS = muttng_dotlock pgpringng pgpewrapng makedoc
6
7 if BUILD_IMAP
8 IMAP_SUBDIR = imap
9 IMAP_INCLUDES = -I$(top_srcdir)/imap
10 endif
11
12 if BUILD_NNTP
13 NNTP_SUBDIR = nntp
14 NNTP_INCLUDES = -I$(top_srcdir)/nntp
15 endif
16
17 SUBDIRS = intl m4 po lib-lib lib-mime lib-hash doc contrib lib pop $(IMAP_SUBDIR) $(NNTP_SUBDIR)
18
19 bin_SCRIPTS = muttngbug fleang
20
21 BUILT_SOURCES = keymap_defs.h version.h
22
23 bin_PROGRAMS = muttng muttng_dotlock pgpringng pgpewrapng smime_keysng
24 muttng_SOURCES = $(BUILT_SOURCES) \
25         alias.c attach.c base64.c browser.c buffy.c \
26         charset.c color.c compress.c crypt.c cryptglue.c commands.c complete.c \
27         compose.c copy.c curs_lib.c curs_main.c crypt-mod.c crypt-mod.h \
28         date.c edit.c editmsg.c enter.c \
29         flags.c filter.c from.c getdomain.c \
30         handler.c hcache.c hdrline.c headers.c help.c history.c hook.c \
31         init.c keymap.c lib.c \
32         main.c mbox.c mbyte.c menu.c mh.c muttlib.c mutt_idna.c mx.c \
33         pager.c parse.c pattern.c postpone.c query.c \
34         recvattach.c recvcmd.c rfc1524.c rfc3676.c \
35         score.c send.c sendlib.c sidebar.c signal.c sort.c state.c status.c system.c \
36         thread.c url.c utf8.c wcwidth.c \
37         account.c mutt_socket.c mutt_tunnel.c \
38         pgp.c pgpinvoke.c pgpkey.c pgplib.c gnupgparse.c pgpmicalg.c pgppacket.c \
39         crypt-mod-pgp-classic.c smime.c crypt-mod-smime-classic.c
40
41
42 muttng_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAP) -Lpop -lpop $(LIBNNTP) \
43         -Llib-lib -llib -Llib-mime -lmime -Llib-hash -lhash -Llib -lsane $(MUTTLIBS) $(INTLLIBS) $(LIBICONV)
44
45 muttng_DEPENDENCIES = @MUTT_LIB_OBJECTS@ @LIBOBJS@ \
46                       $(top_builddir)/lib-lib/liblib.a \
47                       $(top_builddir)/lib-mime/libmime.a \
48                       $(top_builddir)/lib-hash/libhash.a \
49                       $(top_builddir)/lib/libsane.a \
50                       $(top_builddir)/pop/libpop.a  \
51         $(LIBIMAPDEPS) $(LIBNNTPDEPS) $(INTLDEPS)
52
53 makedoc_SOURCES = makedoc.c
54 makedoc_LDADD = -Llib-lib -llib
55 makedoc_DEPENDENCIES = $(top_builddir)/lib-lib/liblib.a
56
57 CPP=@CPP@
58
59 DEFS=-DPKGDATADIR=\"$(pkgdatadir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \
60         -DBINDIR=\"$(bindir)\" -DMUTTLOCALEDIR=\"$(datadir)/locale\" \
61         -DHAVE_CONFIG_H=1 -DPKGDOCDIR=\"$(docdir)\"
62
63 INCLUDES=-I. -I$(top_srcdir) $(IMAP_INCLUDES) $(NNTP_INCLUDES) $(LIBGPGME_CFLAGS) -Iintl
64
65 CPPFLAGS=@CPPFLAGS@ -I$(includedir)
66
67 EXTRA_muttng_SOURCES = \
68         account.c mutt_sasl.c mutt_socket.c mutt_ssl.c \
69         mutt_tunnel.c pgp.c pgpinvoke.c pgpkey.c \
70         pgplib.c pgpmicalg.c gnupgparse.c resize.c dotlock.c remailer.c \
71         alias.h browser.h enter.h \
72         mbyte.h remailer.h url.h state.h \
73         mutt_idna.h mutt_libesmtp.c sidebar.h state.h
74
75 EXTRA_DIST = config.rpath  COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO \
76         configure acconfig.h \
77         account.h alias.h attach.h recvattach.h handler.h thread.h \
78         buffy.h charset.h compress.h copy.h \
79         dotlock.h functions.def gen_defs \
80         enter.h recvattach.h handler.h thread.h \
81         globals.h history.h init.h keymap.h mutt_crypt.h \
82         mime.h mutt.h mutt_curses.h mutt_menu.h \
83         mutt_sasl.h mutt_socket.h mutt_ssl.h mutt_tunnel.h \
84         mbox.h mh.h mx.h pager.h pgp.h protos.h rfc1524.h \
85         rfc3676.h \
86         sort.h mime.types autogen.sh \
87         _regex.h OPS.MIX remailer.c remailer.h browser.h state.h \
88         mbyte.h lib.h extlib.c pgpewrap.c smime_keys.pl pgplib.h Muttngrc.head Muttngrc \
89         makedoc.c stamp-doc-rc README.SSL smime.h\
90         muttngbug pgppacket.h depcomp BEWARE \
91         mkchangelog.sh cvslog2changelog.pl mutt_idna.h \
92         regex.c mutt_libesmtp.h crypt-gpgme.h
93
94 muttng_dotlock_SOURCES = dotlock.c
95 muttng_dotlock_LDADD = -Llib-lib -llib @LIBOBJS@
96 muttng_dotlock_DEPENDENCIES = @LIBOBJS@ $(top_builddir)/lib-lib/liblib.a
97
98 pgpringng_SOURCES = pgppubring.c pgplib.c lib.c extlib.c pgppacket.c
99 pgpringng_LDADD = @LIBOBJS@ $(INTLLIBS) \
100                   -Llib-lib -llib -Llib-hash -lhash -Llib -lsane
101 pgpringng_DEPENDENCIES = @LIBOBJS@ $(INTLDEPS) \
102                          $(top_builddir)/lib-lib/liblib.a \
103                          $(top_builddir)/lib-hash/libhash.a
104
105 pgpewrapng_SOURCES = pgpewrap.c
106 pgpewrapng_LDADD = 
107 pgpewrapng_DEPENDENCIES = 
108
109 CLEANFILES = stamp-doc-rc makedoc \
110         keymap_alldefs.h keymap_defs.h version.h
111
112 ACLOCAL_AMFLAGS = -I m4
113
114 LDADD = @LIBOBJS@ @LIBINTL@
115
116 OPS=@OPS@
117
118 fleang: muttbug.sh
119         cp muttbug.sh fleang
120         chmod +x fleang
121
122 smime_keysng: $(srcdir)/smime_keys.pl
123         cp $(srcdir)/smime_keys.pl smime_keysng
124         chmod +x smime_keysng
125
126 Makefile: $(BUILT_SOURCES)
127
128 keymap_defs.h: $(OPS) $(srcdir)/gen_defs
129         $(srcdir)/gen_defs $(OPS) > keymap_defs.h
130
131 keymap_alldefs.h: $(srcdir)/OPS $(srcdir)/OPS.PGP $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME $(srcdir)/gen_defs
132         $(srcdir)/gen_defs $(srcdir)/OPS $(srcdir)/OPS.PGP \
133                 $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME \
134                         > keymap_alldefs.h
135
136 version.h:
137         echo "#define MUTT_REVISION \"git\"" > version.h
138
139 install-exec-hook:
140         if test -f $(DESTDIR)$(bindir)/mutt.dotlock && test -f $(DESTDIR)$(bindir)/muttng_dotlock ; then        \
141                 rm -f $(DESTDIR)$(bindir)/mutt.dotlock ;                \
142                 ln -sf $(DESTDIR)$(bindir)/muttng_dotlock $(DESTDIR)$(bindir)/mutt.dotlock ; \
143         fi
144         if test -f $(DESTDIR)$(bindir)/muttng_dotlock && test x@DOTLOCK_GROUP@ != x ; then \
145                 chgrp @DOTLOCK_GROUP@ $(DESTDIR)$(bindir)/muttng_dotlock && \
146                 chmod @DOTLOCK_PERMISSION@ $(DESTDIR)$(bindir)/muttng_dotlock || \
147                 { echo "Can't fix muttng_dotlock's permissions!" >&2 ; } \
148         fi
149
150 install-data-local: Muttngrc
151         $(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
152         -if [ -f $(DESTDIR)$(pkgdatadir)/Muttngrc ] ; then \
153                 mv $(DESTDIR)$(pkgdatadir)/Muttngrc* $(DESTDIR)$(sysconfdir) ; \
154         elif [ -f $(DESTDIR)$(pkgdatadir)/../Muttngrc ] ; then \
155                 mv $(DESTDIR)$(pkgdatadir)/../Muttngrc* $(DESTDIR)$(sysconfdir) ; \
156         elif [ ! -f $(DESTDIR)$(sysconfdir)/Muttngrc ] ; then \
157                 $(INSTALL) -m 644 Muttngrc $(DESTDIR)$(sysconfdir) ; \
158         fi
159         -if [ ! -f $(DESTDIR)$(sysconfdir)/muttng-mime.types ]; then \
160                 $(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir)/muttng-mime.types; \
161         fi
162
163
164 # kluge around automake problems.
165
166 dist-hook:
167         -for file in $(BUILT_SOURCES) ; do rm -f $(distdir)/$$file ; done
168
169 mutt-dist:
170         (cd $(srcdir) && ./build-release )
171
172 update-doc: stamp-doc-rc
173         (cd doc && $(MAKE) update-doc)
174
175 Muttngrc: stamp-doc-rc
176
177 stamp-doc-rc: $(srcdir)/init.h makedoc Muttngrc.head
178         -rm -f Muttngrc stamp-doc-rc
179         $(CPP) $(INCLUDES) $(DEFS) $(CPPFLAGS) -D_MAKEDOC -C \
180                 $(srcdir)/init.h | ./makedoc -c | cat Muttngrc.head - > Muttngrc
181         touch stamp-doc-rc
182
183
184 -include cflags.mk