CC	=	gcc
CFLAGS	=	-Wall
LDLIBS	=	-lm
PROGS	=	testvector2 simpletestvector2 overrideprint testvv simpletestvv simpletestvehicle simpletestcar
D	=	$(shell pwd)
DIRNAME	=	$(shell basename $D)

all:	$(PROGS)

clean:
	/bin/rm -f $(PROGS) *.o core

tar:	clean mktar

mktar:
	echo making $(DIRNAME)
	cd ..; tar czf $(DIRNAME).tgz $(DIRNAME)

testvector2:	testvector2.o vector2.o testsupport.o
simpletestvector2:	simpletestvector2.o vector2.o
overrideprint:	overrideprint.o vector2.o
testvv:	testvv.o vector2.o vv.o testsupport.o
simpletestvv:	simpletestvv.o vector2.o vv.o
simpletestvehicle:	simpletestvehicle.o vehicle.o vector2.o
simpletestcar:	simpletestcar.o car.o vehicle.o vector2.o vv.o

overrideprint.o:	vector2.h
vector2.o:	vector2.h
vehicle.o:	vehicle.h
car.o:	car.h
vv.o:	vv.h
simpletestvector2.o:	vector2.h
testsupport.o:	testsupport.h
testvector2.o:	vector2.h testsupport.h
testvv.o:	vector2.h vv.h testsupport.h
simpletestvv.o:	vector2.h vv.h
simpletestvehicle.o:	vector2.h vehicle.h
simpletestcar.o:	vector2.h vehicle.h car.h
