##
## Copyright (c)  1995 - 2000, The Hebrew University of Jerusalem.
## All rights reserved.
##
## Permission to use, copy and distribute this software is hereby granted
## under the terms of version 2 or any later version of the GNU General
## Public License, as published by the Free Software Foundation.
##
## You should have received a copy of the GNU General Public License along
## with this package; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##
## THE HEBREW UNIVERSITY OF JERUSALEM  PROVIDES THIS SOFTWARE IN ITS "AS IS"
## CONDITION. THE HEBREW UNIVERSITY OF JERUSALEM DISCLAIMS  ANY LIABILITY OF
## ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
## 

##
## Author(s): Ariel Eizenberg
##

BDIRS	=	lib bin sbin usr.bin
SFILES	=	$(foreach d,$(BDIRS),$(wildcard $(d)/*/Makefile))
SDIRS	=	$(dir $(SFILES))

MAKE	=	make
TOPDIR	=	$(shell pwd)

all: build

build:
	@echo Compiling MOSIX Utilities
	for i in $(BDIRS) ; do for j in $(TOPDIR)/$$i/*/Makefile ; do cd `dirname $$j` ;  $(MAKE) all ; done ; done 

install: 
	@echo Installing MOSIX Utilities
	for i in $(BDIRS) ; do for j in $(TOPDIR)/$$i/*/Makefile ; do cd `dirname $$j` ;  $(MAKE) install ; done ; done 


clean:
	@echo Cleaning sources.
	for i in $(BDIRS) ; do for j in $(TOPDIR)/$$i/*/Makefile ; do cd `dirname $$j` ;  $(MAKE) clean ; done ; done 

clobber: clean

