2 # Makefile for mts subdirectory
10 # flags passed to recursive makes in subdirectories
11 MAKEDEFS = CC='$(CC)' CPPFLAGS='$(CPPFLAGS)' DEFS='$(DEFS)' \
12 CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
13 prefix='$(prefix)' exec_prefix='$(exec_prefix)' bindir='$(bindir)' \
14 etcdir='$(etcdir)' libdir='$(libdir)' mandir='$(mandir)' \
15 mailspool='$(mailspool)' sendmailpath='$(sendmailpath)' \
16 default_editor='$(default_editor)' default_pager='$(default_pager)'
22 GNU_LIBTOOL = @GNU_LIBTOOL@
24 # object files that go into libmts.a
25 OBJS = smtp/hosts.o smtp/smtp.o
30 # all files in this directory included in the distribution
36 # ========= DEPENDENCIES FOR BUILDING AND INSTALLING ==========
38 all: all-recursive libmts.a
41 for subdir in $(SUBDIRS); do \
42 (cd $$subdir && $(MAKE) $(MAKEDEFS) all) || exit 1; \
47 if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
48 $(LIBTOOL) -static -c $(OBJS) -o $@ ; \
50 ar cr $@ `$(LORDER) $(OBJS) | $(TSORT) 2>/dev/null` ; \
56 # ========== DEPENDENCIES FOR CLEANUP ==========
58 mostlyclean: mostlyclean-recursive mostlyclean-local
59 clean: clean-recursive clean-local
60 distclean: distclean-recursive distclean-local
61 realclean: realclean-recursive realclean-local
62 superclean: superclean-recursive superclean-local
67 clean-local: mostlyclean-local
69 distclean-local: clean-local
72 realclean-local: distclean-local
74 superclean-local: realclean-local
76 mostlyclean-recursive clean-recursive distclean-recursive realclean-recursive superclean-recursive:
77 for subdir in $(SUBDIRS); do \
78 target=`echo $@ | sed 's/-recursive//'`; \
79 (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \
82 # ========== DEPENDENCIES FOR LINT =================
85 for subdir in $(SUBDIRS); do \
86 ( cd $$subdir && $(MAKE) $(MAKEDEFS) lint ) || exit 1; \
89 # ========== DEPENDENCIES FOR MAINTENANCE ==========
93 Makefile: Makefile.in ../config.status
94 cd .. && ./config.status $(subdir)/$@
96 distdir = ../`cat ../distname`/$(subdir)
98 @echo "Copying distribution files in $(subdir)"
99 @for file in $(DIST); do \
100 cp -p $(srcdir)/$$file $(distdir); \
102 @for subdir in $(SUBDIRS); do \
103 mkdir $(distdir)/$$subdir; \
104 chmod 755 $(distdir)/$$subdir; \
105 (cd $$subdir && $(MAKE) $@) || exit 1; \