remove old lib.[hc]
[apps/madmutt.git] / Makefile.am
index 8bc2864..7cbb665 100644 (file)
@@ -2,42 +2,52 @@
 ## Use aclocal -I m4; automake --foreign
 
 AUTOMAKE_OPTIONS = foreign
-EXTRA_PROGRAMS = madmutt_dotlock pgpringng pgpewrapng makedoc
+EXTRA_PROGRAMS = madmutt_dotlock makedoc
 
 if BUILD_NNTP
 NNTP_SUBDIR = nntp
 endif
 
-SUBDIRS = intl m4 po $(XXXXXXXXXXXX_doc) contrib \
-         lib-mime lib-lib lib-mx lib-crypt lib-hash lib-sys lib-ui \
+SUBDIRS = tools intl m4 po $(XXXXXXXXXXXX_doc) apidoc \
+         lib-lua lib-mime lib-lib lib-mx lib-hash lib-sys lib-ui \
          pop imap $(NNTP_SUBDIR)
 
-BUILT_SOURCES = keymap_defs.h version.h charset.gperf
+BUILT_SOURCES = keymap_defs.h charset.gperf
 DISTCLEANFILES = $(BUILT_SOURCES)
 
-bin_PROGRAMS = madmutt madmutt_dotlock pgpringng pgpewrapng smime_keysng
+bin_PROGRAMS = madmutt madmutt_dotlock smime_keysng
 madmutt_SOURCES = $(BUILT_SOURCES) \
        alias.c attach.c base64.c browser.c buffy.c charset.c commands.c \
-       compose.c copy.c editmsg.c init.c keymap.c lib.c \
+       compose.c copy.c crypt.c editmsg.c init.c keymap.c \
        flags.c from.c handler.c headers.c help.c hook.c \
        main.c muttlib.c mutt_idna.c pager.c pattern.c postpone.c recvattach.c recvcmd.c \
-       score.c send.c sendlib.c sort.c state.c thread.c account.c
+       score.c send.c sendlib.c sort.c state.c thread.c account.c remailer.c
 
 madmutt_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ \
-              -Llib-lib -llib -Llib-mime -lmime -Llib-crypt -lcrypt -Llib-mx -lmx \
-              -Limap -limap -Lpop -lpop $(LIBNNTP) \
-              -Llib-hash -lhash -Llib-sys -lsys -Llib-ui -lui \
-              $(MUTTLIBS) $(INTLLIBS) $(LIBICONV)
-
-madmutt_DEPENDENCIES = @MUTT_LIB_OBJECTS@ @LIBOBJS@ \
+               $(top_builddir)/lib-mime/libmime.a \
+               $(top_builddir)/lib-mx/libmx.a \
+               $(top_builddir)/imap/libimap.a \
+               $(top_builddir)/pop/libpop.a \
+               $(LIBNNTP) \
+               $(top_builddir)/lib-hash/libhash.a \
+               $(top_builddir)/lib-sys/libsys.a \
+               $(top_builddir)/lib-ui/libui.a \
+               $(top_builddir)/lib-lua/liblua.a \
+               $(top_builddir)/lib-lib/liblib.a \
+               $(MUTTLIBS) $(INTLLIBS) $(LIBICONV)
+
+madmutt_DEPENDENCIES = \
+                      \
+                      @MUTT_LIB_OBJECTS@ @LIBOBJS@ \
                       $(top_builddir)/lib-lib/liblib.a \
                       $(top_builddir)/lib-mime/libmime.a \
-                      $(top_builddir)/lib-crypt/libcrypt.a \
                       $(top_builddir)/lib-hash/libhash.a \
+                      $(top_builddir)/lib-sys/libsys.a \
                       $(top_builddir)/lib-ui/libui.a \
+                      $(top_builddir)/lib-lua/liblua.a \
                       $(top_builddir)/lib-mx/libmx.a \
                       \
-                      $(top_builddir)/pop/libpop.a  \
+                      $(top_builddir)/pop/libpop.a   \
                       $(top_builddir)/imap/libimap.a \
                       $(LIBNNTPDEPS) $(INTLDEPS)
 
@@ -60,39 +70,25 @@ EXTRA_madmutt_SOURCES = \
        alias.h browser.h remailer.h state.h \
        mutt_idna.h mutt_libesmtp.c state.h
 
-EXTRA_DIST = config.rpath  COPYRIGHT GPL OPS OPS.MIX TODO \
+EXTRA_DIST = config.rpath  COPYRIGHT GPL OPS TODO \
        configure account.h alias.h attach.h recvattach.h handler.h thread.h \
-       buffy.h charset.h copy.h dotlock.h functions.def gen_defs \
+       buffy.h charset.h copy.h crypt.c dotlock.h functions.def gen_defs \
        recvattach.h handler.h thread.h globals.h init.h keymap.h \
        mime.h mutt.h mutt_sasl.h pager.h protos.h \
-       sort.h mime.types autogen.sh remailer.c remailer.h browser.h state.h \
-       lib.h extlib.c pgpewrap.c smime_keys.pl Madmuttrc.head Madmuttrc \
+       sort.h autogen.sh remailer.c remailer.h browser.h state.h \
+       smime_keys.pl Madmuttrc.head Madmuttrc \
        makedoc.c stamp-doc-rc README.SSL depcomp mutt_idna.h mutt_libesmtp.h
 
 madmutt_dotlock_SOURCES = dotlock.c
 madmutt_dotlock_LDADD = -Llib-lib -llib @LIBOBJS@
 madmutt_dotlock_DEPENDENCIES = @LIBOBJS@ $(top_builddir)/lib-lib/liblib.a
 
-pgpringng_SOURCES = pgppubring.c lib.c extlib.c
-pgpringng_LDADD = @LIBOBJS@ $(INTLLIBS) \
-                 -Llib-lib -llib -Llib-hash -lhash -Llib-crypt -lcrypt
-pgpringng_DEPENDENCIES = @LIBOBJS@ $(INTLDEPS) \
-                        $(top_builddir)/lib-lib/liblib.a \
-                        $(top_builddir)/lib-hash/libhash.a
-
-pgpewrapng_SOURCES = pgpewrap.c
-pgpewrapng_LDADD = 
-pgpewrapng_DEPENDENCIES = 
-
-CLEANFILES = stamp-doc-rc makedoc \
-       keymap_alldefs.h keymap_defs.h version.h
+CLEANFILES = stamp-doc-rc makedoc keymap_defs.h Madmuttrc
 
 ACLOCAL_AMFLAGS = -I m4
 
 LDADD = @LIBOBJS@ @LIBINTL@
 
-OPS=@OPS@
-
 charset.gperf: charset.def
        sh $< > $@
 
@@ -100,17 +96,9 @@ smime_keysng: $(srcdir)/smime_keys.pl
        cp $(srcdir)/smime_keys.pl smime_keysng
        chmod +x smime_keysng
 
-Makefile: $(BUILT_SOURCES)
-
-keymap_defs.h: $(OPS)
+keymap_defs.h: OPS
        $(srcdir)/gen_defs $^ > keymap_defs.h
 
-keymap_alldefs.h: $(srcdir)/OPS $(srcdir)/OPS.MIX
-       $(srcdir)/gen_defs $^ > keymap_alldefs.h
-
-version.h:
-       echo "#define MUTT_REVISION \"git\"" > version.h
-
 install-exec-hook:
        if test -f $(DESTDIR)$(bindir)/mutt.dotlock && test -f $(DESTDIR)$(bindir)/madmutt_dotlock ; then       \
                rm -f $(DESTDIR)$(bindir)/mutt.dotlock ;                \
@@ -122,41 +110,29 @@ install-exec-hook:
                { echo "Can't fix madmutt_dotlock's permissions!" >&2 ; } \
        fi
 
-install-data-local: madmuttrc
+install-data-local: Madmuttrc
        $(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
-       -if [ -f $(DESTDIR)$(pkgdatadir)/madmuttrc ] ; then \
-               mv $(DESTDIR)$(pkgdatadir)/madmuttrc* $(DESTDIR)$(sysconfdir) ; \
-       elif [ -f $(DESTDIR)$(pkgdatadir)/../madmuttrc ] ; then \
-               mv $(DESTDIR)$(pkgdatadir)/../madmuttrc* $(DESTDIR)$(sysconfdir) ; \
-       elif [ ! -f $(DESTDIR)$(sysconfdir)/madmuttrc ] ; then \
-               $(INSTALL) -m 644 madmuttrc $(DESTDIR)$(sysconfdir) ; \
-       fi
-       -if [ ! -f $(DESTDIR)$(sysconfdir)/madmutt-mime.types ]; then \
-               $(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir)/madmutt-mime.types; \
+       -if [ -f $(DESTDIR)$(pkgdatadir)/Madmuttrc ] ; then \
+               mv $(DESTDIR)$(pkgdatadir)/Madmuttrc* $(DESTDIR)$(sysconfdir) ; \
+       elif [ -f $(DESTDIR)$(pkgdatadir)/../Madmuttrc ] ; then \
+               mv $(DESTDIR)$(pkgdatadir)/../Madmuttrc* $(DESTDIR)$(sysconfdir) ; \
+       elif [ ! -f $(DESTDIR)$(sysconfdir)/Madmuttrc ] ; then \
+               $(INSTALL) -m 644 Madmuttrc $(DESTDIR)$(sysconfdir) ; \
        fi
 
-
-# kluge around automake problems.
-
-dist-hook:
-       -for file in $(BUILT_SOURCES) ; do rm -f $(distdir)/$$file ; done
-
-mutt-dist:
-       (cd $(srcdir) && ./build-release )
-
 update-doc: stamp-doc-rc
        (cd doc && $(MAKE) update-doc)
 
-madmuttrc: stamp-doc-rc
+Madmuttrc: stamp-doc-rc
 
-stamp-doc-rc: $(srcdir)/init.h makedoc madmuttrc.head
-       -rm -f madmuttrc stamp-doc-rc
+stamp-doc-rc: $(srcdir)/init.h makedoc Madmuttrc.head
+       -rm -f Madmuttrc stamp-doc-rc
        $(CPP) $(INCLUDES) $(DEFS) $(CPPFLAGS) -D_MAKEDOC -C \
-               $(srcdir)/init.h | ./makedoc -c | cat madmuttrc.head - > madmuttrc
-       touch stamp-doc-rc
-
+               $(srcdir)/init.h | ./makedoc -c | cat Madmuttrc.head - > Madmuttrc
+       touch $@
 
--include cflags.mk
+include tools/cpkg2c.mk
+-include tools/cflags.mk
 
 wc:
        @sloccount $(wildcard *.h *.c) $(wildcard lib-*/) lib imap nntp pop | grep 'ansic[=:]'