# On a PC, cpp and cem are in /lib and will be removed to make space while
# linking the kernel.  On an AT, they are in /usr/lib are are not removed.
# This is because they have to be in /lib on a PC; the diskette is too small
# for them to be in /usr/lib.
#

h=../h
l=/usr/lib
CFLAGS = -Di8088 -F -T.

obj =	main.s forkexit.s break.s exec.s signal.s getset.s  \
	alloc.s utility.s table.s putc.s

mm:	makefile    $l/head.s $(obj) $l/libc.a $l/end.s
	@echo "Start linking MM."
	@echo "If disk fills up, remove some files"
	@asld -o mm -T. $l/head.s $(obj) $l/libc.a $l/end.s
	@mv /mm mm
	@echo "MM done. "

clean:
	rm -f $(obj)

alloc.s:	const.h $h/const.h $h/type.h

break.s:	const.h $h/const.h $h/type.h
break.s:	$h/error.h
break.s:	$h/signal.h
break.s:	glo.h
break.s:	mproc.h
break.s:	param.h

exec.s:		const.h $h/const.h $h/type.h
exec.s:		$h/callnr.h
exec.s:		$h/error.h
exec.s:		$h/stat.h
exec.s:		glo.h
exec.s:		mproc.h
exec.s:		param.h

forkexit.s:	const.h $h/const.h $h/type.h
forkexit.s:	$h/callnr.h
forkexit.s:	$h/error.h
forkexit.s:	glo.h
forkexit.s:	mproc.h
forkexit.s:	param.h

getset.s:	const.h $h/const.h $h/type.h
getset.s:	$h/callnr.h
getset.s:	$h/error.h
getset.s:	glo.h
getset.s:	mproc.h
getset.s:	param.h

main.s:		const.h $h/const.h $h/type.h
main.s:		$h/callnr.h
main.s:		$h/com.h
main.s:		$h/error.h
main.s:		glo.h
main.s:		mproc.h
main.s:		param.h

putc.s:		$h/const.h $h/type.h
putc.s:		$h/com.h

signal.s:	const.h $h/const.h $h/type.h
signal.s:	$h/callnr.h
signal.s:	$h/com.h
signal.s:	$h/error.h
signal.s:	$h/signal.h
signal.s:	$h/stat.h
signal.s:	glo.h
signal.s:	mproc.h
signal.s:	param.h

table.s:	const.h $h/const.h $h/type.h
table.s:	$h/callnr.h
table.s:	glo.h
table.s:	mproc.h
table.s:	param.h

utility.s:	const.h $h/const.h $h/type.h
utility.s:	$h/callnr.h
utility.s:	$h/com.h
utility.s:	$h/error.h
utility.s:	$h/stat.h
utility.s:	glo.h
utility.s:	mproc.h
