CREATE=5620
DCC=$$DMD/bin/dmdcc
OBJ= vitty.m graphics.m rotate.m identify.m rotfont.m polygon.m scatmat.m qsort.m

.SUFFIXES: .c .m
.c.m:
	$(DCC) $(DFLAGS) -c $*.c
	mv $*.o $*.m

all: exists download

exists:
	if test x$$DMD = x; then echo Shell variable DMD must be set and exported; exit 1; fi

download: $(OBJ)
	$(DCC) $(OBJ) -o $$SHOME/cmd/Sterm.$(CREATE)

simple: simplegr vitty.m graphics.m polygon.m rotfont.m
	$(DCC) vitty.m graphics.m polygon.m rotfont.m -o $$SHOME/cmd/Sterm.$(CREATE)

simplegr:
	-rm graphics.m
	make DFLAGS=-DSIMPLE graphics.m
