# Makefile PUB = /home/cs228/public EGDIR = $(PUB)/examples HRDIR = $(PUB)/HR LIB = $(PUB)/lib THELIB = libcs228.a # to add a new object: list it in OBJECTS, and give a target below OBJECTS = prompt.o assign2.o swap.o rand.o password.o ask_yn.o \ cstack.o cqueue.o cset.o clist.o rand2.o Deallocate.o \ String.o IntFlexVec.o $(THELIB): $(OBJECTS) ar rv $(THELIB) $? cstack.o cqueue.o cset.o clist.o rand.o password.o rand2.o: cd $(HRDIR); make Deallocate.o: cd $(EGDIR)/Deallocate; make String.o: cd $(EGDIR)/String; make IntFlexVec.o: cd $(EGDIR)/IntFlexVec; make ask_yn.o: cd $(EGDIR)/ask_yn; make prompt.o: cd $(EGDIR)/prompt; make assign2.o: cd $(EGDIR)/assign2; make swap.o: cd $(EGDIR)/swap; make clean: rm -f *.o *.exe cd $(EGDIR); rm -f */*.o */*.exe cd $(HRDIR); rm -f */*.o */*.exe cleanall: clean rm -f *~ core