INSTALLDIR=	$(HOME)/Apps

DYNAVIEWS=	AquariumView.o

PSWFILES=	wraps.o

THINGSTOREMOVE = wraps.c wraps.h Fish.o RotImage.o Aquarium.o FishBrain.o

.SUFFIXES: .m .o .c .psw

.m.o:
	cc  -O -g -Wall -c $*.m -o $*.o

AquariumView.o: Aquarium.o Aquarium.h Fish.o Fish.h RotImage.o FishBrain.o wraps.o
	ld  -x -r -o AquariumView.o Aquarium.o Fish.o RotImage.o wraps.o FishBrain.o

MyImage.o: wraps.o

wraps.o: wraps.psw wraps.c
	cc  -O -g -c wraps.c

wraps.c:
	pswrap -h wraps.h -o wraps.c wraps.psw
all::
	$(MAKE) $(PSWFILES)
	$(MAKE) $(DYNAVIEWS)
	
clean::
	rm -rf $(PSWFILES) $(DYNAVIEWS) $(THINGSTOREMOVE)
	

install::	all install-views

install-views::
	mkdirs $(INSTALLDIR)/BackSpace.app && \
	for view in $(DYNAVIEWS); do \
	  cp $$view $(INSTALLDIR)/BackSpace.app; \
	done
