CC=g++
CFLAGS=-g -Wall
OBJS=CardsDriver.o Hand.o Card.o

# rule for building the executable
CardsDriver: $(OBJS)
	$(CC) -o CardsDriver $(OBJS)

all:  CardsDriver


# list of file dependencies
CardsDriver.o: Hand.h Card.h NodeList.tcc
Hand.o: Hand.h NodeList.h Card.h NodeList.tcc VariousExceptions.h
Card.o: Card.h

# the following rule is used to compile .cpp files to .o
.cpp.o:
	$(CC) $(CFLAGS) -c $<


# the following removes all .o files, but leaves the executable
clean:
	rm -f *.o
