#	Copyright (c) 1989 Carrick Sean Casey. All rights reserved.
#
#	Master makefile for the "ICB" Internet chat system.
#	The file COPYING details the usage license.

# While we shouldn't have to do this, some makes are broken.
SHELL=	/bin/sh


#	Directories to do a make in.
DIRS 		= src

#	Files to be tarred up with "make dist".
DISTFILES	= COPYING Installing Makefile Modifying \
		  README contrib src icbrc.sample icbserverdb setup history \
		  docs murgil protocol.h support tcl version.h

PREREQS		= config

#	Default

all:		$(PREREQS)
	@for dir in ${DIRS}; do \
		(echo Making in $${dir}; \
		 cd $${dir}; ${MAKE} ${MFLAGS} -${MAKEFLAGS}); done

install:	$(PREREQS)
	@for dir in ${DIRS} ${MANDIRS}; do \
		(echo Making install in $${dir}; \
		cd $${dir}; ${MAKE} ${MFLAGS} -${MAKEFLAGS} install); done

depend:		$(PREREQS)
	@for dir in ${DIRS}; do \
		(echo Making depend in $${dir}; \
		cd $${dir}; ${MAKE} ${MFLAGS} -${MAKEFLAGS} depend); done

lint:		$(PREREQS)
	@for dir in ${DIRS}; do \
		(echo Making lint in $${dir}; \
		cd $${dir}; ${MAKE} ${MFLAGS} -${MAKEFLAGS} lint); done

clean:
	-rm -f $(TOPCLEAN)
	-rm -rf test
	@for dir in ${DIRS}; do \
		(echo Making clean in $${dir}; \
		cd $${dir}; ${MAKE} clean); done
