
#
#	Makefile at the top of the discuss source hierarchy
#

# configuration info needed for installation
SHELL= /bin/sh

prefix  = @prefix@
mandir  = @mandir@
INSTALL = @INSTALL@

all:
	cd include	; $(MAKE) $(MFLAGS) $@
	cd usp		; $(MAKE) $(MFLAGS) $@
	cd libds	; $(MAKE) $(MFLAGS) $@
	cd client	; $(MAKE) $(MFLAGS) $@
	cd edsc		; $(MAKE) $(MFLAGS) $@
	cd regex	; $(MAKE) $(MFLAGS) $@
	cd mclient	; $(MAKE) $(MFLAGS) $@
	cd dsgrep	; $(MAKE) $(MFLAGS) $@
	cd server	; $(MAKE) $(MFLAGS) $@

install:
	cd include	; $(MAKE) $(MFLAGS) $@
	cd usp		; $(MAKE) $(MFLAGS) $@
	cd libds	; $(MAKE) $(MFLAGS) $@
	cd client	; $(MAKE) $(MFLAGS) $@
	cd edsc		; $(MAKE) $(MFLAGS) $@
	cd regex	; $(MAKE) $(MFLAGS) $@
	cd mclient	; $(MAKE) $(MFLAGS) $@
	cd dsgrep	; $(MAKE) $(MFLAGS) $@
	cd server	; $(MAKE) $(MFLAGS) $@
	$(INSTALL) -m 644 discuss.1 $(mandir)/man1

clean:
	cd include	; $(MAKE) $(MFLAGS) $@
	cd usp		; $(MAKE) $(MFLAGS) $@
	cd libds	; $(MAKE) $(MFLAGS) $@
	cd client	; $(MAKE) $(MFLAGS) $@
	cd edsc		; $(MAKE) $(MFLAGS) $@
	cd regex	; $(MAKE) $(MFLAGS) $@
	cd mclient	; $(MAKE) $(MFLAGS) $@
	cd dsgrep	; $(MAKE) $(MFLAGS) $@
	cd server	; $(MAKE) $(MFLAGS) $@

distclean:
	cd include	; $(MAKE) $(MFLAGS) $@
	cd usp		; $(MAKE) $(MFLAGS) $@
	cd libds	; $(MAKE) $(MFLAGS) $@
	cd client	; $(MAKE) $(MFLAGS) $@
	cd edsc		; $(MAKE) $(MFLAGS) $@
	cd regex	; $(MAKE) $(MFLAGS) $@
	cd mclient	; $(MAKE) $(MFLAGS) $@
	cd dsgrep	; $(MAKE) $(MFLAGS) $@
	cd server	; $(MAKE) $(MFLAGS) $@
	rm -f Makefile config.status config.cache config.log *~
