CC=g++
CFLAGS=-g -Wall
OBJS=ExpressionDriver.o ExpressionTree.o Token.o

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

all:  ExpressionDriver


# list of file dependencies
ExpressionDriver.o: ExpressionTree.h ExpressionDriver.cpp Token.h VariousExceptions.h
ExpressionTree.o:   ExpressionTree.h ExpressionTree.cpp BinaryTree.h BinaryTree.tcc VariousExceptions.h Token.h
Token.o:            Token.h Token.cpp

# 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
