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 # mail transport agent we are using (currently always smtp)
38 # DEPRECATED: smtp/sendmail functionality handled by mts.conf
40 # ========= DEPENDENCIES FOR BUILDING AND INSTALLING ==========
42 all: all-recursive libmts.a
45 for subdir in $(SUBDIRS); do \
46 (cd $$subdir && $(MAKE) $(MAKEDEFS) all) || exit 1; \
51 if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
52 $(LIBTOOL) -static -c $(OBJS) -o $@ ; \
54 ar cr $@ `$(LORDER) $(OBJS) | $(TSORT) 2>/dev/null` ; \
60 # ========== DEPENDENCIES FOR CLEANUP ==========
62 mostlyclean: mostlyclean-recursive mostlyclean-local
63 clean: clean-recursive clean-local
64 distclean: distclean-recursive distclean-local
65 realclean: realclean-recursive realclean-local
66 superclean: superclean-recursive superclean-local
71 clean-local: mostlyclean-local
73 distclean-local: clean-local
76 realclean-local: distclean-local
78 superclean-local: realclean-local
80 mostlyclean-recursive clean-recursive distclean-recursive realclean-recursive superclean-recursive:
81 for subdir in $(SUBDIRS); do \
82 target=`echo $@ | sed 's/-recursive//'`; \
83 (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \
86 # ========== DEPENDENCIES FOR LINT =================
89 for subdir in $(SUBDIRS); do \
90 ( cd $$subdir && $(MAKE) $(MAKEDEFS) lint ) || exit 1; \
93 # ========== DEPENDENCIES FOR MAINTENANCE ==========
97 Makefile: Makefile.in ../config.status
98 cd .. && ./config.status $(subdir)/$@
100 distdir = ../`cat ../distname`/$(subdir)
102 @echo "Copying distribution files in $(subdir)"
103 @for file in $(DIST); do \
104 cp -p $(srcdir)/$$file $(distdir); \
106 @for subdir in $(SUBDIRS); do \
107 mkdir $(distdir)/$$subdir; \
108 chmod 755 $(distdir)/$$subdir; \
109 (cd $$subdir && $(MAKE) $@) || exit 1; \