We'll always use sendmail (spost) now
[mmh] / mts / Makefile.in
1 #
2 # Makefile for mts subdirectory
3 #
4
5 SHELL = /bin/sh
6
7 srcdir = @srcdir@
8 VPATH  = @srcdir@
9
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)'
17
18 LORDER = @LORDER@
19 TSORT  = @TSORT@
20 RANLIB = @RANLIB@
21 LIBTOOL = @LIBTOOL@
22 GNU_LIBTOOL = @GNU_LIBTOOL@
23
24 # object files that go into libmts.a
25 OBJS =  smtp/hosts.o smtp/smtp.o
26
27 # auxiliary files
28 AUX = Makefile.in
29
30 # all files in this directory included in the distribution
31 DIST = $(AUX)
32
33 # subdirectories
34 SUBDIRS = smtp
35
36 # ========= DEPENDENCIES FOR BUILDING AND INSTALLING ==========
37
38 all: all-recursive libmts.a
39
40 all-recursive:
41         for subdir in $(SUBDIRS); do \
42           (cd $$subdir && $(MAKE) $(MAKEDEFS) all) || exit 1; \
43         done
44
45 libmts.a: $(OBJS)
46         rm -f $@
47         if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
48           $(LIBTOOL) -static -c $(OBJS) -o $@  ; \
49         else \
50           ar cr $@ `$(LORDER) $(OBJS) | $(TSORT) 2>/dev/null`  ; \
51           $(RANLIB) $@  ; \
52         fi 
53
54 install uninstall:
55
56 # ========== DEPENDENCIES FOR CLEANUP ==========
57
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
63
64 mostlyclean-local:
65         rm -f *~
66
67 clean-local: mostlyclean-local
68         rm -f libmts.a
69 distclean-local: clean-local
70         rm -f Makefile
71
72 realclean-local: distclean-local
73
74 superclean-local: realclean-local
75
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; \
80         done
81
82 # ========== DEPENDENCIES FOR LINT =================
83
84 lint:
85         for subdir in $(SUBDIRS); do \
86           ( cd $$subdir && $(MAKE) $(MAKEDEFS) lint ) || exit 1; \
87         done
88
89 # ========== DEPENDENCIES FOR MAINTENANCE ==========
90
91 subdir = mts
92
93 Makefile: Makefile.in ../config.status
94         cd .. && ./config.status $(subdir)/$@
95  
96 distdir = ../`cat ../distname`/$(subdir)
97 nmhdist: $(DIST)
98         @echo "Copying distribution files in $(subdir)"
99         @for file in $(DIST); do \
100           cp -p $(srcdir)/$$file $(distdir); \
101         done
102         @for subdir in $(SUBDIRS); do \
103           mkdir $(distdir)/$$subdir; \
104           chmod 755 $(distdir)/$$subdir; \
105           (cd $$subdir && $(MAKE) $@) || exit 1; \
106         done
107