2 # Makefile for zotnet subdirectory
16 GNU_LIBTOOL = @GNU_LIBTOOL@
18 # flags passed to recursive makes in subdirectories
19 MAKEDEFS = CC='$(CC)' CPPFLAGS='$(CPPFLAGS)' DEFS='$(DEFS)' \
20 CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
21 prefix='$(prefix)' exec_prefix='$(exec_prefix)' bindir='$(bindir)' \
22 etcdir='$(etcdir)' libdir='$(libdir)' mandir='$(mandir)' \
23 mailspool='$(mailspool)' sendmailpath='$(sendmailpath)' \
24 default_editor='$(default_editor)' default_pager='$(default_pager)'
26 # object files in libzot.a
27 OBJS = mts/mts.o mts/client.o \
28 tws/dtime.o tws/dtimep.o tws/lexstring.o \
35 # all files in this directory included in the distribution
39 SUBDIRS = mts tws mf bboards
41 # ========= DEPENDENCIES FOR BUILDING AND INSTALLING ==========
43 all: all-recursive libzot.a
47 if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
48 $(LIBTOOL) -static -c $(OBJS) -o $@ ; \
50 ar cr $@ `$(LORDER) $(OBJS) | $(TSORT)` ; \
55 for subdir in $(SUBDIRS); do \
56 (cd $$subdir && $(MAKE) $(MAKEDEFS) all) || exit 1; \
60 for subdir in $(SUBDIRS); do \
61 (cd $$subdir && $(MAKE) $(MAKEDEFS) $@) || exit 1; \
64 # ========== DEPENDENCIES FOR CLEANUP ==========
66 mostlyclean: mostlyclean-recursive mostlyclean-local
67 clean: clean-recursive clean-local
68 distclean: distclean-recursive distclean-local
69 realclean: realclean-recursive realclean-local
70 superclean: superclean-recursive superclean-local
75 clean-local: mostlyclean-local
78 distclean-local: clean-local
81 realclean-local: distclean-local
83 superclean-local: realclean-local
85 mostlyclean-recursive clean-recursive distclean-recursive realclean-recursive superclean-recursive:
86 for subdir in $(SUBDIRS); do \
87 target=`echo $@ | sed 's/-recursive//'`; \
88 (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \
91 # ========== DEPENDENCIES FOR MAINTENANCE ==========
95 Makefile: Makefile.in ../config.status
96 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
98 distdir = ../`cat ../distname`/$(subdir)
100 @echo "Copying distribution files in $(subdir)"
101 @for file in $(DIST); do \
102 cp -p $(srcdir)/$$file $(distdir); \
104 @for subdir in $(SUBDIRS); do \
105 mkdir $(distdir)/$$subdir; \
106 chmod 755 $(distdir)/$$subdir; \
107 (cd $$subdir && $(MAKE) $@) || exit 1; \