SYSTEM=GENERIC	# Generic Unix, in fact

# where the drivers (tx, txx) go
BINDIR=/usr/local/bin

# the base directory for the rest of T3X
TXBASE=/usr/local/t3x
TXDIR=$(TXBASE)/r5

# where the manual pages go
MANDIR=/usr/local/man/man1

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

all:	Build Compiler
	@echo done

Build:
	(cd build; make -f Makefile.$(SYSTEM))

Compiler:
	(cd compiler; make -f Makefile.$(SYSTEM))

clean:
	(cd build; make -f Makefile.$(SYSTEM) clean)
	(cd compiler; make -f Makefile.$(SYSTEM) clean)

clobber:
	(cd build; make -f Makefile.$(SYSTEM) clobber)
	(cd compiler; make -f Makefile.$(SYSTEM) clobber)

install:
	-mkdir $(TXBASE)
	-mkdir $(TXDIR)
	-mkdir $(TXDIR)/bin
	-mkdir $(TXDIR)/inc
	cp compiler/tx-tcode.sh $(TXDIR)/tx
	cp compiler/tx-tcode.sh $(BINDIR)/tx
	cp compiler/txx $(BINDIR)
	cp compiler/txx $(TXDIR)/bin
	cp compiler/ux.tcode $(TXDIR)/bin
	cp compiler/txinfo.tcode $(TXDIR)/bin
	cp compiler/txtrn.tcode $(TXDIR)/bin
	cp compiler/txopt.tcode $(TXDIR)/bin
	cp compiler/txpp.tcode $(TXDIR)/bin
	cp inc/basic.inc $(TXDIR)/inc
	cp inc/ios.inc $(TXDIR)/inc
	cp inc/mem.inc $(TXDIR)/inc
