CC = cc68

CFLAGS = -VSINU -I/u/68k/include

OFILES	=  asctab.o div.o env.o expr.o extern.o getf.o hyphen.o hyptab.o\
	main.o misc.o process.o reg.o req1.o req2.o reqmisc.o request.o\
	table.o

M68C	= m68000crts0.o

PFILES	= hpljet.o

TFILES	= tty.o

all: troff  nroff
	echo all done

troff:	$(OFILES) $(PFILES) $(M68C)
	$(CC) -tr -o troff $(OFILES) $(PFILES)
	gemfix <troff >troff.ttp


nroff:	$(OFILES) $(TFILES) $(M68C)
	$(CC) -V -tr -o nroff $(OFILES) $(TFILES)
	gemfix <nroff >nroff.ttp

clean:
	-exec rm $(OFILES) $(PFILES) $(TFILES)

install:
	-exec cp troff /bin
	-exec cp nroff /bin
	-exec rm troff nroff

hpljet.o:	drv/hpljet.c
	exec $(CC) $(CFLAGS) -c drv/hpljet.c -I.

tty.o:	drv/tty.c
	exec $(CC) $(CFLAGS) -c drv/tty.c -I.

asctab.o: roff.h char.h

div.o: roff.h code.h div.h reg.h str.h

env.o: roff.h code.h env.h esc.h

expr.o: roff.h code.h div.h env.h

extern.o: roff.h code.h env.h div.h reg.h str.h

getf.o: roff.h code.h env.h esc.h div.h reg.h str.h

hyphen.o: roff.h code.h hyphen.h char.h roff.h hyphen.h

main.o: roff.h code.h env.h esc.h div.h reg.h str.h

misc.o: roff.h str.h

process.o: roff.h char.h code.h div.h env.h esc.h hyphen.h reg.h

reg.o: roff.h reg.h

req1.o: roff.h code.h div.h env.h esc.h reg.h str.h

req2.o: roff.h code.h env.h div.h reg.h str.h esc.h

reqmisc.o: roff.h code.h env.h div.h reg.h str.h

request.o: roff.h reg.h str.h

table.o: roff.h esc.h font.h

m68000crts0.o: m68000crts0.s
	as68 -gx -o m68000crts0.o m68000crts0.s
