CC = g++
.SUFFIXES = .cc
CFLAGS = -O2 -Wall
LFLAGS = 
OBJS = Coordinates.o Cell.o List.o Queue.o StepHash.o CoordHash.o \
       Edge.o main.o

all:
	echo $(OBJS.cc.o)
	cp Makefile Makefile-tmp
	for i in *.cc; do\
	 perl -e 'print "$$ARGV[0]: ";while (<>) { if (/^#include "(\S+)"/) { print "$$1 "; } } print "\n";' $$i >>Makefile-tmp;\
	done
	make -f Makefile-tmp all-hide

all-hide: $(OBJS)
	$(CC) $(CFLAGS) -o testque $(OBJS) $(LFLAGS) 

.cc.o:
	$(CC) $(CFLAGS) -c $<

### Dependences after this line
Cell.cc: Cell.h Vertex.h StepHash.h 
CoordHash.cc: CoordHash.h 
Coordinates.cc: Coordinates.h 
Edge.cc: Edge.h 
List.cc: List.h Vertex.h StepHash.h 
Queue.cc: Queue.h Vertex.h StepHash.h 
StepHash.cc: StepHash.h 
main.cc: Queue.h Vertex.h Edge.h 
