CROSS= CC=g++ CFLAGS=-g -Wall $(CROSS) LFLAGS=$(CROSS) OBJS=WebHistoryDriver.o BoundedStackA.o BoundedStackB.o TOBJS=Tester.o BoundedStackA.o BoundedStackB.o # rule for building the executable WebHistoryDriver: $(OBJS) $(CC) -o WebHistoryDriver $(OBJS) $(LFLAGS) # rule for building the executable Tester: $(TOBJS) $(CC) -o Tester $(TOBJS) $(LFLAGS) all: WebHistoryDriver Tester # list of file dependencies WebHistoryDriver.o: BoundedStack.h BoundedStackA.h BoundedStackB.h BoundedStackA.o: BoundedStack.h BoundedStackA.h BoundedStackB.o: BoundedStack.h BoundedStackB.h Tester.o: BoundedStack.h BoundedStackA.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