]> diplodocus.org Git - nmh/blob - zotnet/Makefile.in
de661262d1c3f813024cc5554836f6545fedecd0
[nmh] / zotnet / Makefile.in
1 #
2 # Makefile for zotnet subdirectory
3 #
4 # $Id$
5 #
6
7 SHELL = /bin/sh
8
9 srcdir = @srcdir@
10 VPATH = @srcdir@
11
12 LORDER = @LORDER@
13 TSORT = @TSORT@
14 RANLIB = @RANLIB@
15 LIBTOOL = @LIBTOOL@
16
17 # flags passed to recursive makes in subdirectories
18 MAKEDEFS = CC='$(CC)' CPPFLAGS='$(CPPFLAGS)' DEFS='$(DEFS)' \
19 CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
20 prefix='$(prefix)' exec_prefix='$(exec_prefix)' bindir='$(bindir)' \
21 etcdir='$(etcdir)' libdir='$(libdir)' mandir='$(mandir)' \
22 mailspool='$(mailspool)' sendmailpath='$(sendmailpath)' \
23 default_editor='$(default_editor)' default_pager='$(default_pager)'
24
25 # object files in libzot.a
26 OBJS = mts/mts.o mts/client.o \
27 tws/dtime.o tws/dtimep.o tws/lexstring.o \
28 mf/mf.o \
29 bboards/getbbent.o
30
31 # auxiliary files
32 AUX = Makefile.in
33
34 # all files in this directory included in the distribution
35 DIST = $(AUX)
36
37 # subdirectories
38 SUBDIRS = mts tws mf bboards
39
40 # ========= DEPENDENCIES FOR BUILDING AND INSTALLING ==========
41
42 all: all-recursive libzot.a
43
44 libzot.a: $(OBJS)
45 rm -f $@
46 if test x$(LIBTOOL) != xno ; then \
47 $(LIBTOOL) -static -c $(OBJS) -o $@ ; \
48 else \
49 ar cr $@ `$(LORDER) $(OBJS) | $(TSORT)` ; \
50 $(RANLIB) $@ ; \
51 fi
52
53 all-recursive:
54 for subdir in $(SUBDIRS); do \
55 (cd $$subdir && $(MAKE) $(MAKEDEFS) all) || exit 1; \
56 done
57
58 install uninstall:
59 for subdir in $(SUBDIRS); do \
60 (cd $$subdir && $(MAKE) $(MAKEDEFS) $@) || exit 1; \
61 done
62
63 # ========== DEPENDENCIES FOR CLEANUP ==========
64
65 mostlyclean: mostlyclean-recursive mostlyclean-local
66 clean: clean-recursive clean-local
67 distclean: distclean-recursive distclean-local
68 realclean: realclean-recursive realclean-local
69 superclean: superclean-recursive superclean-local
70
71 mostlyclean-local:
72 rm -f *~
73
74 clean-local: mostlyclean-local
75 rm -f libzot.a
76
77 distclean-local: clean-local
78 rm -f Makefile
79
80 realclean-local: distclean-local
81
82 superclean-local: realclean-local
83
84 mostlyclean-recursive clean-recursive distclean-recursive realclean-recursive superclean-recursive:
85 for subdir in $(SUBDIRS); do \
86 target=`echo $@ | sed 's/-recursive//'`; \
87 (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \
88 done
89
90 # ========== DEPENDENCIES FOR MAINTENANCE ==========
91
92 subdir = zotnet
93
94 Makefile: Makefile.in ../config.status
95 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
96
97 distdir = ../`cat ../distname`/$(subdir)
98 nmhdist: $(DIST)
99 @echo "Copying distribution files in $(subdir)"
100 @for file in $(DIST); do \
101 cp -p $(srcdir)/$$file $(distdir); \
102 done
103 @for subdir in $(SUBDIRS); do \
104 mkdir $(distdir)/$$subdir; \
105 chmod 755 $(distdir)/$$subdir; \
106 (cd $$subdir && $(MAKE) $@) || exit 1; \
107 done
108