2 # Makefile for mts subdirectory
12 # flags passed to recursive makes in subdirectories
13 MAKEDEFS = CC='$(CC)' CPPFLAGS='$(CPPFLAGS)' DEFS='$(DEFS)' \
14 CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
15 prefix='$(prefix)' exec_prefix='$(exec_prefix)' bindir='$(bindir)' \
16 etcdir='$(etcdir)' libdir='$(libdir)' mandir='$(mandir)' \
17 mailspool='$(mailspool)' sendmailpath='$(sendmailpath)' \
18 default_editor='$(default_editor)' default_pager='$(default_pager)'
24 GNU_LIBTOOL = @GNU_LIBTOOL@
26 # object files that go into libmts.a
27 OBJS = generic/client.o generic/mts.o smtp/hosts.o smtp/smtp.o
32 # all files in this directory included in the distribution
36 SUBDIRS = smtp generic
38 # mail transport agent we are using (currently always smtp)
40 # DEPRECATED: smtp/sendmail functionality handled by mts.conf
42 # ========= DEPENDENCIES FOR BUILDING AND INSTALLING ==========
44 all: all-recursive libmts.a
47 for subdir in $(SUBDIRS); do \
48 (cd $$subdir && $(MAKE) $(MAKEDEFS) all) || exit 1; \
53 if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
54 $(LIBTOOL) -static -c $(OBJS) -o $@ ; \
56 ar cr $@ `$(LORDER) $(OBJS) | $(TSORT)` ; \
62 # ========== DEPENDENCIES FOR CLEANUP ==========
64 mostlyclean: mostlyclean-recursive mostlyclean-local
65 clean: clean-recursive clean-local
66 distclean: distclean-recursive distclean-local
67 realclean: realclean-recursive realclean-local
68 superclean: superclean-recursive superclean-local
73 clean-local: mostlyclean-local
75 distclean-local: clean-local
78 realclean-local: distclean-local
80 superclean-local: realclean-local
82 mostlyclean-recursive clean-recursive distclean-recursive realclean-recursive superclean-recursive:
83 for subdir in $(SUBDIRS); do \
84 target=`echo $@ | sed 's/-recursive//'`; \
85 (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \
88 # ========== DEPENDENCIES FOR LINT =================
91 for subdir in $(SUBDIRS); do \
92 ( cd $$subdir && $(MAKE) $(MAKEDEFS) lint ) || exit 1; \
95 # ========== DEPENDENCIES FOR MAINTENANCE ==========
99 Makefile: Makefile.in ../config.status
100 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
102 distdir = ../`cat ../distname`/$(subdir)
104 @echo "Copying distribution files in $(subdir)"
105 @for file in $(DIST); do \
106 cp -p $(srcdir)/$$file $(distdir); \
108 @for subdir in $(SUBDIRS); do \
109 mkdir $(distdir)/$$subdir; \
110 chmod 755 $(distdir)/$$subdir; \
111 (cd $$subdir && $(MAKE) $@) || exit 1; \