#
# cterm host-based graphics demos
#
CFLAGS=	-O -s

all: bounce bounds clock grav mandel stringart spf3

bounce:	bounce.o gfxlimits.o
	$(CC) $(CFLAGS) -o $@ $@.o gfxlimits.o

bounds: bounds.o gfxlimits.o
	$(CC) $(CFLAGS) -o $@ $@.o gfxlimits.o

clock: clock.o gfxlimits.o
	$(CC) $(CFLAGS) -o $@ $@.o gfxlimits.o

grav: grav.o gfxlimits.o
	$(CC) $(CFLAGS) -o $@ $@.o gfxlimits.o

mandel: mandel.o gfxlimits.o
	$(CC) $(CFLAGS) -o $@ $@.o gfxlimits.o -lm

stringart: stringart.o sart_data.o gfxlimits.o
	$(CC) $(CFLAGS) -o $@ $@.o sart_data.o gfxlimits.o

spf3: spf3.o gfxlimits.o
	$(CC) $(CFLAGS) -o $@ $@.o gfxlimits.o

#
# View a demo picture
# -just type "make picture"
#
picture: spheres
	clear
	cat spheres

spheres: spheres.Z
	uncompress spheres

spheres.Z: spheres.uu
	uudecode spheres.uu
#
# View the Mandlebrot set
# -just type "make mandelpic"
#
mandelpic: mandelset
	clear
	cat mandelset

mandelset: mandelset.Z
	uncompress mandelset

mandelset.Z: mandel.uu
	uudecode mandel.uu

clean:
	-rm -f *.o core spheres mandelset *.Z
