All:	tc ../compiler/txx ../native/libtx.a txcg386.tcode

.SUFFIXES:	.t .tcode

tc:	tc.sh
	chmod +x tc.sh
	ln -s tc.sh tc

../compiler/txx:
	(cd ../compiler; make -f Makefile.BSD txx)

../native/libtx.a:
	(cd ../native; make -f Makefile.BSD libtx.a)

txcg386.tcode:	../native/cg386.def
	../compiler/txx txtrn.tcode <../compiler/txpp.t >txpp.tcode
	../compiler/txx txpp.tcode <../native/txcgg.t >txcgg.t
	../compiler/txx txtrn.tcode <txcgg.t >txcgg.tcode
	ln -fs ../native/txcg_asm_frame txcg_frame
	../compiler/txx txcgg.tcode <../native/cg386.def >txcg386.pp
	rm -f txcg_frame
	../compiler/txx txpp.tcode <txcg386.pp >txcg386.t
	../compiler/txx txtrn.tcode <txcg386.t >txcg386.tcode
	rm -f txpp.tcode txcgg.t txcgg.tcode txcg386.pp txcg386.t

clean:

clobber:	clean
	rm -f tc txcg386.tcode txcgg.tcode txcg_frame txcg386.pp txcg386.t \
	txcgg.t txpp.tcode *.ERR

