# # Makefile for zotnet subdirectory # # $Id$ # SHELL = /bin/sh srcdir = @srcdir@ VPATH = @srcdir@ LORDER = @LORDER@ TSORT = @TSORT@ RANLIB = @RANLIB@ LIBTOOL = @LIBTOOL@ GNU_LIBTOOL = @GNU_LIBTOOL@ # flags passed to recursive makes in subdirectories MAKEDEFS = CC='$(CC)' CPPFLAGS='$(CPPFLAGS)' DEFS='$(DEFS)' \ CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \ prefix='$(prefix)' exec_prefix='$(exec_prefix)' bindir='$(bindir)' \ etcdir='$(etcdir)' libdir='$(libdir)' mandir='$(mandir)' \ mailspool='$(mailspool)' sendmailpath='$(sendmailpath)' \ default_editor='$(default_editor)' default_pager='$(default_pager)' # object files in libzot.a OBJS = mts/mts.o mts/client.o \ tws/dtime.o tws/dtimep.o tws/lexstring.o \ mf/mf.o \ bboards/getbbent.o # auxiliary files AUX = Makefile.in # all files in this directory included in the distribution DIST = $(AUX) # subdirectories SUBDIRS = mts tws mf bboards # ========= DEPENDENCIES FOR BUILDING AND INSTALLING ========== all: all-recursive libzot.a libzot.a: $(OBJS) rm -f $@ if test x$(LIBTOOL) != xno -a x$(GNU_LIBTOOL) = x ; then \ $(LIBTOOL) -static -c $(OBJS) -o $@ ; \ else \ ar cr $@ `$(LORDER) $(OBJS) | $(TSORT)` ; \ $(RANLIB) $@ ; \ fi all-recursive: for subdir in $(SUBDIRS); do \ (cd $$subdir && $(MAKE) $(MAKEDEFS) all) || exit 1; \ done install uninstall: for subdir in $(SUBDIRS); do \ (cd $$subdir && $(MAKE) $(MAKEDEFS) $@) || exit 1; \ done # ========== DEPENDENCIES FOR CLEANUP ========== mostlyclean: mostlyclean-recursive mostlyclean-local clean: clean-recursive clean-local distclean: distclean-recursive distclean-local realclean: realclean-recursive realclean-local superclean: superclean-recursive superclean-local mostlyclean-local: rm -f *~ clean-local: mostlyclean-local rm -f libzot.a distclean-local: clean-local rm -f Makefile realclean-local: distclean-local superclean-local: realclean-local mostlyclean-recursive clean-recursive distclean-recursive realclean-recursive superclean-recursive: for subdir in $(SUBDIRS); do \ target=`echo $@ | sed 's/-recursive//'`; \ (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \ done # ========== DEPENDENCIES FOR MAINTENANCE ========== subdir = zotnet Makefile: Makefile.in ../config.status cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status distdir = ../`cat ../distname`/$(subdir) nmhdist: $(DIST) @echo "Copying distribution files in $(subdir)" @for file in $(DIST); do \ cp -p $(srcdir)/$$file $(distdir); \ done @for subdir in $(SUBDIRS); do \ mkdir $(distdir)/$$subdir; \ chmod 755 $(distdir)/$$subdir; \ (cd $$subdir && $(MAKE) $@) || exit 1; \ done