1 ## Process this file with automake to produce Makefile.in
2 ## Use aclocal -I m4; automake --foreign
4 AUTOMAKE_OPTIONS = foreign
5 EXTRA_PROGRAMS = madmutt_dotlock pgpringng pgpewrapng makedoc
9 NNTP_INCLUDES = -I$(top_srcdir)/nntp
12 SUBDIRS = intl m4 po $(XXXXXXXXXXXX_doc) contrib \
13 lib-lib lib-mime lib-crypt lib-hash lib-network lib-ui lib \
14 pop imap $(NNTP_SUBDIR)
16 BUILT_SOURCES = keymap_defs.h version.h
18 bin_PROGRAMS = madmutt madmutt_dotlock pgpringng pgpewrapng smime_keysng
19 madmutt_SOURCES = $(BUILT_SOURCES) \
20 alias.c attach.c base64.c browser.c buffy.c \
21 charset.c compress.c commands.c complete.c \
22 compose.c copy.c editmsg.c \
23 flags.c filter.c from.c getdomain.c \
24 handler.c hcache.c hdrline.c headers.c help.c history.c hook.c \
25 init.c keymap.c lib.c \
26 main.c mbox.c mbyte.c mh.c muttlib.c mutt_idna.c mx.c \
27 pager.c pattern.c postpone.c query.c \
28 recvattach.c recvcmd.c rfc1524.c rfc3676.c \
29 score.c send.c sendlib.c sidebar.c signal.c sort.c state.c status.c system.c \
30 thread.c url.c utf8.c wcwidth.c account.c
32 madmutt_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ \
33 -Limap -limap -Lpop -lpop $(LIBNNTP) \
34 -Llib-lib -llib -Llib-mime -lmime -Llib-crypt -lcrypt -Llib-hash -lhash \
35 -Llib-network -lnetwork -Llib-ui -lui \
36 -Llib -lsane $(MUTTLIBS) $(INTLLIBS) $(LIBICONV)
38 madmutt_DEPENDENCIES = @MUTT_LIB_OBJECTS@ @LIBOBJS@ \
39 $(top_builddir)/lib-lib/liblib.a \
40 $(top_builddir)/lib-mime/libmime.a \
41 $(top_builddir)/lib-crypt/libcrypt.a \
42 $(top_builddir)/lib-hash/libhash.a \
43 $(top_builddir)/lib-ui/libui.a \
44 $(top_builddir)/lib/libsane.a \
46 $(top_builddir)/pop/libpop.a \
47 $(top_builddir)/imap/libimap.a \
48 $(LIBNNTPDEPS) $(INTLDEPS)
50 makedoc_SOURCES = makedoc.c
51 makedoc_LDADD = -Llib-lib -llib
52 makedoc_DEPENDENCIES = $(top_builddir)/lib-lib/liblib.a
56 DEFS=-DPKGDATADIR=\"$(pkgdatadir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \
57 -DBINDIR=\"$(bindir)\" -DMUTTLOCALEDIR=\"$(datadir)/locale\" \
58 -DHAVE_CONFIG_H=1 -DPKGDOCDIR=\"$(docdir)\"
60 INCLUDES=-I. -I$(top_srcdir) $(IMAP_INCLUDES) $(NNTP_INCLUDES) $(GPGME_CFLAGS) -Iintl
62 CPPFLAGS=@CPPFLAGS@ -I$(includedir)
64 EXTRA_madmutt_SOURCES = \
65 account.c mutt_sasl.c resize.c dotlock.c remailer.c \
66 alias.h browser.h mbyte.h remailer.h url.h state.h \
67 mutt_idna.h mutt_libesmtp.c sidebar.h state.h
69 EXTRA_DIST = config.rpath COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO \
70 configure account.h alias.h attach.h recvattach.h handler.h thread.h \
71 buffy.h charset.h compress.h copy.h \
72 dotlock.h functions.def gen_defs \
73 recvattach.h handler.h thread.h \
74 globals.h history.h init.h keymap.h mutt_crypt.h \
75 mime.h mutt.h mutt_sasl.h mbox.h mh.h mx.h pager.h protos.h rfc1524.h \
76 rfc3676.h sort.h mime.types autogen.sh \
77 OPS.MIX remailer.c remailer.h browser.h state.h \
78 mbyte.h lib.h extlib.c pgpewrap.c smime_keys.pl pgplib.h madmuttrc.head madmuttrc \
79 makedoc.c stamp-doc-rc README.SSL smime.h\
80 depcomp mutt_idna.h mutt_libesmtp.h
82 madmutt_dotlock_SOURCES = dotlock.c
83 madmutt_dotlock_LDADD = -Llib-lib -llib @LIBOBJS@
84 madmutt_dotlock_DEPENDENCIES = @LIBOBJS@ $(top_builddir)/lib-lib/liblib.a
86 pgpringng_SOURCES = pgppubring.c lib.c extlib.c
87 pgpringng_LDADD = @LIBOBJS@ $(INTLLIBS) \
88 -Llib-lib -llib -Llib-hash -lhash -Llib-crypt -lcrypt -Llib -lsane
89 pgpringng_DEPENDENCIES = @LIBOBJS@ $(INTLDEPS) \
90 $(top_builddir)/lib-lib/liblib.a \
91 $(top_builddir)/lib-hash/libhash.a
93 pgpewrapng_SOURCES = pgpewrap.c
95 pgpewrapng_DEPENDENCIES =
97 CLEANFILES = stamp-doc-rc makedoc \
98 keymap_alldefs.h keymap_defs.h version.h
100 ACLOCAL_AMFLAGS = -I m4
102 LDADD = @LIBOBJS@ @LIBINTL@
106 smime_keysng: $(srcdir)/smime_keys.pl
107 cp $(srcdir)/smime_keys.pl smime_keysng
108 chmod +x smime_keysng
110 Makefile: $(BUILT_SOURCES)
112 keymap_defs.h: $(OPS) $(srcdir)/gen_defs
113 $(srcdir)/gen_defs $(OPS) > keymap_defs.h
115 keymap_alldefs.h: $(srcdir)/OPS $(srcdir)/OPS.PGP $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME $(srcdir)/gen_defs
116 $(srcdir)/gen_defs $(srcdir)/OPS $(srcdir)/OPS.PGP \
117 $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME \
121 echo "#define MUTT_REVISION \"git\"" > version.h
124 if test -f $(DESTDIR)$(bindir)/mutt.dotlock && test -f $(DESTDIR)$(bindir)/madmutt_dotlock ; then \
125 rm -f $(DESTDIR)$(bindir)/mutt.dotlock ; \
126 ln -sf $(DESTDIR)$(bindir)/madmutt_dotlock $(DESTDIR)$(bindir)/mutt.dotlock ; \
128 if test -f $(DESTDIR)$(bindir)/madmutt_dotlock && test x@DOTLOCK_GROUP@ != x ; then \
129 chgrp @DOTLOCK_GROUP@ $(DESTDIR)$(bindir)/madmutt_dotlock && \
130 chmod @DOTLOCK_PERMISSION@ $(DESTDIR)$(bindir)/madmutt_dotlock || \
131 { echo "Can't fix madmutt_dotlock's permissions!" >&2 ; } \
134 install-data-local: madmuttrc
135 $(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
136 -if [ -f $(DESTDIR)$(pkgdatadir)/madmuttrc ] ; then \
137 mv $(DESTDIR)$(pkgdatadir)/madmuttrc* $(DESTDIR)$(sysconfdir) ; \
138 elif [ -f $(DESTDIR)$(pkgdatadir)/../madmuttrc ] ; then \
139 mv $(DESTDIR)$(pkgdatadir)/../madmuttrc* $(DESTDIR)$(sysconfdir) ; \
140 elif [ ! -f $(DESTDIR)$(sysconfdir)/madmuttrc ] ; then \
141 $(INSTALL) -m 644 madmuttrc $(DESTDIR)$(sysconfdir) ; \
143 -if [ ! -f $(DESTDIR)$(sysconfdir)/madmutt-mime.types ]; then \
144 $(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir)/madmutt-mime.types; \
148 # kluge around automake problems.
151 -for file in $(BUILT_SOURCES) ; do rm -f $(distdir)/$$file ; done
154 (cd $(srcdir) && ./build-release )
156 update-doc: stamp-doc-rc
157 (cd doc && $(MAKE) update-doc)
159 madmuttrc: stamp-doc-rc
161 stamp-doc-rc: $(srcdir)/init.h makedoc madmuttrc.head
162 -rm -f madmuttrc stamp-doc-rc
163 $(CPP) $(INCLUDES) $(DEFS) $(CPPFLAGS) -D_MAKEDOC -C \
164 $(srcdir)/init.h | ./makedoc -c | cat madmuttrc.head - > madmuttrc