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