.SUFFIXES: .cpp .o
EXECUTABLES= 	Brain TestAI
SHARED_OBS= 	Action.o ActionTable.o Auxilliary.o CommServer.o \
		Config.o PotentialMap.o Robot.o Vector.o \
		VisionClient.o

INCLUDES = -I.
CFLAGS = -pg -g -Wall $(INCLUDES)
LFLAGS=	-pg -lm -lpthread

CPP=	g++
LINKER= g++
MAKEDEP = makedepend


#SOURCES=$(addsuffix .cpp,$(NAMES) )

all:	$(EXECUTABLES)

Brain:	$(SHARED_OBS) Brain.o
	$(LINKER) $(SHARED_OBS) $@.o $(LFLAGS) -o $@

TestAI: $(SHARED_OBS) TestAI.o
	$(LINKER) $(SHARED_OBS) $@.o $(LFLAGS) -o $@

%.o : %.cpp
	$(CPP) ${CFLAGS} -c $< -o $@

dep:
	$(MAKEDEP) $(INCLUDES) -Y -s "# Dependancies (generated by 'make dep')" *.c 2>/dev/null
	$(RM) -f Makefile.bak

clean:
	rm -f *.o *~ $(EXECUTABLES)

