</$objtype/mkfile

# The location of the T3X compiler
txdir=$home/t3x

OPTIONS=	-DBASIC_EXT -DGRAPHICS_EXT

default:V:	txx libtx.a system.vf

txx:	txx.$O lib.$O gfx.$O plan9.$O gfx.h
	$LD -o txx txx.$O lib.$O gfx.$O plan9.$O

txx.$O:		txx_ext.h
gfx.$O:		gfx.h
plan9.$O:	gfx.h
lib.$O:		gfx.h

system.vf:	sys6x12.vfd mkvfont
	mkvfont 6 12 sys6x12.vfd system.vf

libtx.a:	libtx.$O gfx.$O plan9.$O
	ar crv libtx.a libtx.$O gfx.$O plan9.$O

mkvfont:	mkvfont.c
	$CC -Dplan9 -B mkvfont.c
	$LD -o mkvfont mkvfont.$O

install:
	cp txx $txdir/bin
	cp libtx.a $txdir/lib
	cp mkvfont $txdir/bin
	cp sys6x12.vfd $txdir/lib
	cp system.vf $txdir/lib
	cp ../inc/graphics.inc $txdir/inc
	cp ../inc/vio.inc $txdir/inc

%.$O:	%.c
	$CC -B -Dplan9 $OPTIONS $stem.c

clean:
	rm -f *.$O font8.h font16.h gtest

nuke:	clean
	rm -f tx txx libtx.a mkvfont system.vf txx10.taf _
