# This is the destination directory for `make install'
TXDIR=C:\V\T3XR5

default:
	@command /c echo.
	@command /c echo First read the file INSTALL.DOC, then type 'make all'.
	@command /c echo.

all:
	cd compiler
	make -f Makefile.S86
	cd ..
	cd s86kit
	make -f Makefile.S86
	cd ..
	s86kit\s86 <native\libtx86.s >build\libtx86.o
	cd native
	make -f Makefile.S86
	cd ..

boot:
	cd build
	make -f Makefile.S86
	cd ..
	cd compiler
	make -f Makefile.S86 boot
	cd ..
	cd native
	make -f Makefile.S86 boot TC=..\build\tc TX=txboot
	cd ..
	cd s86kit
	make -f Makefile.S86 boot
	cd ..
	cd native
	make -f Makefile.S86 TX=txboot
	cd ..
	cd s86kit
	make -f Makefile.S86 boot2 TX=..\native\txboot
	cd ..

clean:
	cd build
	make -f Makefile.S86 clean
	cd ..
	cd compiler
	make -f Makefile.S86 clean
	cd ..
	cd native
	make -f Makefile.S86 clean
	cd ..
	cd s86kit
	make -f Makefile.S86 clean
	cd ..

clobber:
	cd build
	make -f Makefile.S86 clobber
	cd ..
	cd compiler
	make -f Makefile.S86 clobber
	cd ..
	cd native
	make -f Makefile.S86 clobber
	cd ..
	cd s86kit
	make -f Makefile.S86 clobber
	cd ..

install:
	-mkdir $(TXDIR)
	copy build\txx.exe $(TXDIR)
	copy etxx\inc\vio.inc $(TXDIR)
	copy inc\basic.inc $(TXDIR)
	copy inc\ios.inc $(TXDIR)
	copy inc\mem.inc $(TXDIR)
	copy native\txcg386.exe $(TXDIR)
	copy native\txcg386e.exe $(TXDIR)
	copy native\txcg86a.exe $(TXDIR)
	copy native\txcg86t.exe $(TXDIR)
	copy native\txcgboot.exe $(TXDIR)
	copy native\txcgc.exe $(TXDIR)
	copy native\txcgc_wrap $(TXDIR)
	copy native\txcgg.exe $(TXDIR)
	copy native\txinfo.exe $(TXDIR)
	copy native\txopt.exe $(TXDIR)
	copy native\txpp.exe $(TXDIR)
	copy native\txtrn.exe $(TXDIR)
	copy native\ux.exe $(TXDIR)
	cd s86kit
	make -f Makefile.S86 install
	cd ..
	cd $(TXDIR)
	-del tx.bat
	ren tx-s86.bat tx.bat
