CC=g++ CFLAGS=-g -Wall LFLAGS= OBJS=Driver.o LeakyStackA.o LeakyStackB.o TOBJS=TestEfficiency.o LeakyStackA.o LeakyStackB.o # redundant rules for other common "make ____" commands # that might be typed by a student all: Driver TestEfficiency LeakyStack: Driver # rule for building the executable Driver: $(OBJS) $(CC) -o Driver $(OBJS) $(LFLAGS) TestEfficiency: $(TOBJS) $(CC) -o TestEfficiency $(TOBJS) $(LFLAGS) # list of file dependencies Driver.o: LeakyStack.h LeakyStackA.h LeakyStackB.h InputWrapper.h TestEfficiency.o: LeakyStack.h LeakyStackA.h LeakyStackB.h LeakyStackA.o: LeakyStack.h LeakyStackA.h LeakyStackB.o: LeakyStack.h LeakyStackB.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 Driver TestEfficiency