#
# Makefile for the iBCS emulator files
#
# $Id: Makefile,v 1.43 1997/03/07 21:08:29 jaggy Exp $
# $Source: /usr/CVS/ibcs/Makefile,v $
#

######## You should not need to change anything in this file ########

include CONFIG

SUBDIRS=	iBCSemul Tools

ifeq ($(EMU_X286),yes)
SUBDIRS	:= $(SUBDIRS) x286emul
endif


all:	CONFIG
	set -e; for i in $(SUBDIRS); do \
	  test ! -d $$i || \
	    { $(MAKE) -C $$i; }; done

install: CONFIG devices
	set -e; for i in $(SUBDIRS); do \
	  test ! -d $$i || \
	    { $(MAKE) -C $$i install; }; done

devices:
	cp MAKEDEV.ibcs /dev/MAKEDEV.ibcs
	cd /dev; ./MAKEDEV.ibcs

clean:	CONFIG
	set -e; for i in $(SUBDIRS); do \
	  test ! -d $$i || \
	    { $(MAKE) -C $$i clean; }; done

dep:	CONFIG
	set -e; for i in $(SUBDIRS); do \
	  test ! -d $$i || \
	    { $(MAKE) -C $$i dep; }; done

CONFIG:
	@echo "Copy or link one of CONFIG.i386, CONFIG.sparc to CONFIG first"
	@echo "Then EDIT IT!"
	@exit 1
