# # Makefile for mts subdirectory # # $Id$ # SHELL = /bin/sh srcdir = @srcdir@ VPATH = @srcdir@ # flags passed to recursive makes in subdirectories MAKEDEFS = CC='$(CC)' CPPFLAGS='$(CPPFLAGS)' DEFS='$(DEFS)' \ CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \ prefix='$(prefix)' exec_prefix='$(exec_prefix)' bindir='$(bindir)' \ etcdir='$(etcdir)' libdir='$(libdir)' mandir='$(mandir)' \ mailspool='$(mailspool)' sendmailpath='$(sendmailpath)' \ default_editor='$(default_editor)' default_pager='$(default_pager)' LORDER = @LORDER@ TSORT = @TSORT@ RANLIB = @RANLIB@ LIBTOOL = @LIBTOOL@ GNU_LIBTOOL = @GNU_LIBTOOL@ # object files that go into libmts.a OBJS = smtp/hosts.o smtp/smtp.o # auxiliary files AUX = Makefile.in # all files in this directory included in the distribution DIST = $(AUX) # subdirectories SUBDIRS = smtp # mail transport agent we are using (currently always smtp) # MTS = smtp # DEPRECATED: smtp/sendmail functionality handled by mts.conf # ========= DEPENDENCIES FOR BUILDING AND INSTALLING ========== all: all-recursive libmts.a all-recursive: for subdir in $(SUBDIRS); do \ (cd $$subdir && $(MAKE) $(MAKEDEFS) all) || exit 1; \ done libmts.a: $(OBJS) rm -f $@ if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \ $(LIBTOOL) -static -c $(OBJS) -o $@ ; \ else \ ar cr $@ `$(LORDER) $(OBJS) | $(TSORT)` ; \ $(RANLIB) $@ ; \ fi install uninstall: # ========== DEPENDENCIES FOR CLEANUP ========== mostlyclean: mostlyclean-recursive mostlyclean-local clean: clean-recursive clean-local distclean: distclean-recursive distclean-local realclean: realclean-recursive realclean-local superclean: superclean-recursive superclean-local mostlyclean-local: rm -f *~ clean-local: mostlyclean-local rm -f libmts.a distclean-local: clean-local rm -f Makefile realclean-local: distclean-local superclean-local: realclean-local mostlyclean-recursive clean-recursive distclean-recursive realclean-recursive superclean-recursive: for subdir in $(SUBDIRS); do \ target=`echo $@ | sed 's/-recursive//'`; \ (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \ done # ========== DEPENDENCIES FOR LINT ================= lint: for subdir in $(SUBDIRS); do \ ( cd $$subdir && $(MAKE) $(MAKEDEFS) lint ) || exit 1; \ done # ========== DEPENDENCIES FOR MAINTENANCE ========== subdir = mts Makefile: Makefile.in ../config.status cd .. && ./config.status $(subdir)/$@ distdir = ../`cat ../distname`/$(subdir) nmhdist: $(DIST) @echo "Copying distribution files in $(subdir)" @for file in $(DIST); do \ cp -p $(srcdir)/$$file $(distdir); \ done @for subdir in $(SUBDIRS); do \ mkdir $(distdir)/$$subdir; \ chmod 755 $(distdir)/$$subdir; \ (cd $$subdir && $(MAKE) $@) || exit 1; \ done