PKG=		/usr/lcc
BINDIR=		$(PKG)/bin
BOOTDIR=	$(PKG)/boot
CPP=		$(BINDIR)/cpp
AS=		$(BINDIR)/as
LD=		$(BINDIR)/ld

BOOT=		GEN.T800 GEN.T414 FEP.T800

all:		$(BOOT)

GEN.T800:	boot.S
		$(CPP) -P -DT800 boot.S >boot.s
		$(AS) -T800 boot.s
		$(LD) -T800 -b -o $@ boot.o

GEN.T414:	boot.S
		$(CPP) -P -DT414 boot.S >boot.s
		$(AS) -T414 boot.s
		$(LD) -T414 -b -o $@ boot.o

FEP.T800:	boot.S
		$(CPP) -P -DFEP -DT800 boot.S >boot.s
		$(AS) -T800 boot.s
		$(LD) -T800 -b -o $@ boot.o

install.bin:	$(BOOT)
		for i in $(BOOT); do install -c $$i $(BOOTDIR)/$$i; done

clean:
		rm -f *.o *.s

clobber:	clean
		rm -f $(BOOT)
