CC=g++
CFLAGS=-g -Wall
OBJS=WebHistoryDriver.o BoundedStackA.o BoundedStackB.o

all:  WebHistoryDriver

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

# list of file dependencies
WebHistoryDriver.o: BoundedStack.h BoundedStackA.h BoundedStackB.h
BoundedStackA.o: BoundedStack.h BoundedStackA.h
BoundedStackB.o: BoundedStack.h BoundedStackB.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
