# Makefile for the SPD stuff - based on the Zortech compiler for IBM clones,
# modify to support whatever compiler you have.
CC	=ztc
#
CFLAGS	=-mx -f
#CFLAGS	=-ml -f
OBJ	= obj
SPDOBJS	= lib.$(OBJ) libvec.$(OBJ) disp.$(OBJ)

# Zortech specific graphics library
#LIBFILES=fg.lib
LIBFILES=fgp.lib

# Rule to compile c progs into obj's
.c.$(OBJ):
	$(CC) $(CFLAGS) -c $<

disp.$(OBJ): disp.c disp.h def.h

lib.$(OBJ): lib.c lib.h libvec.h disp.h

libvec.$(OBJ): libvec.c libvec.h

balls.exe: balls.$(OBJ) $(SPDOBJS)
   $(CC) $(CFLAGS) balls.$(OBJ) $(SPDOBJS) $(LIBFILES)

gears.exe: gears.$(OBJ) $(SPDOBJS)
   $(CC) $(CFLAGS) gears.$(OBJ) $(SPDOBJS) $(LIBFILES)

hilbert.exe: hilbert.$(OBJ) $(SPDOBJS)
   $(CC) $(CFLAGS) hilbert.$(OBJ) $(SPDOBJS) $(LIBFILES)

mount.exe: mount.$(OBJ) $(SPDOBJS)
   $(CC) $(CFLAGS) mount.$(OBJ) $(SPDOBJS) $(LIBFILES)

rings.exe: rings.$(OBJ) $(SPDOBJS)
   $(CC) $(CFLAGS) rings.$(OBJ) $(SPDOBJS) $(LIBFILES)

sphcoil.exe: sphcoil.$(OBJ) $(SPDOBJS)
   $(CC) $(CFLAGS) sphcoil.$(OBJ) $(SPDOBJS) $(LIBFILES)

teapot.exe: teapot.$(OBJ) $(SPDOBJS)
   $(CC) $(CFLAGS) teapot.$(OBJ) $(SPDOBJS) $(LIBFILES)

tetra.exe: tetra.$(OBJ) $(SPDOBJS)
   $(CC) $(CFLAGS) tetra.$(OBJ) $(SPDOBJS) $(LIBFILES)

tree.exe: tree.$(OBJ) $(SPDOBJS)
   $(CC) $(CFLAGS) tree.$(OBJ) $(SPDOBJS) $(LIBFILES)

