2 # Makefile for zotnet subdirectory
16 # flags passed to recursive makes in subdirectories
17 MAKEDEFS = CC='$(CC)' CPPFLAGS='$(CPPFLAGS)' DEFS='$(DEFS)' \
18 CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
19 prefix='$(prefix)' exec_prefix='$(exec_prefix)' bindir='$(bindir)' \
20 etcdir='$(etcdir)' libdir='$(libdir)' mandir='$(mandir)' \
21 mailspool='$(mailspool)' sendmailpath='$(sendmailpath)' \
22 default_editor='$(default_editor)' default_pager='$(default_pager)'
24 # object files in libzot.a
25 OBJS = mts/mts.o mts/client.o \
26 tws/dtime.o tws/dtimep.o tws/lexstring.o \
33 # all files in this directory included in the distribution
37 SUBDIRS = mts tws mf bboards
39 # ========= DEPENDENCIES FOR BUILDING AND INSTALLING ==========
41 all: all-recursive libzot.a
45 ar cr libzot.a `$(LORDER) $(OBJS) | $(TSORT)`
49 for subdir in $(SUBDIRS); do \
50 (cd $$subdir && $(MAKE) $(MAKEDEFS) all) || exit 1; \
54 for subdir in $(SUBDIRS); do \
55 (cd $$subdir && $(MAKE) $(MAKEDEFS) $@) || exit 1; \
58 # ========== DEPENDENCIES FOR CLEANUP ==========
60 mostlyclean: mostlyclean-recursive mostlyclean-local
61 clean: clean-recursive clean-local
62 distclean: distclean-recursive distclean-local
63 realclean: realclean-recursive realclean-local
64 superclean: superclean-recursive superclean-local
69 clean-local: mostlyclean-local
72 distclean-local: clean-local
75 realclean-local: distclean-local
77 superclean-local: realclean-local
79 mostlyclean-recursive clean-recursive distclean-recursive realclean-recursive superclean-recursive:
80 for subdir in $(SUBDIRS); do \
81 target=`echo $@ | sed 's/-recursive//'`; \
82 (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \
85 # ========== DEPENDENCIES FOR MAINTENANCE ==========
89 Makefile: Makefile.in ../config.status
90 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
92 distdir = ../`cat ../distname`/$(subdir)
94 @echo "Copying distribution files in $(subdir)"
95 @for file in $(DIST); do \
96 cp -p $(srcdir)/$$file $(distdir); \
98 @for subdir in $(SUBDIRS); do \
99 mkdir $(distdir)/$$subdir; \
100 chmod 755 $(distdir)/$$subdir; \
101 (cd $$subdir && $(MAKE) $@) || exit 1; \