# generic makefile for cps 108 #set up C++ suffixes and relationship between .cc and .o files # for home machine #BASEDIR = /home/ola/tapestry/lib # CS machines #BASEDIR = /usr/project/courses/cps008/lib # for acpub machines BASEDIR = /afs/acpub.duke.edu/users8/ola/courses/lib TLIB = $(BASEDIR)/libtapestry.a INCLUDES = -I. -I$(BASEDIR) .SUFFIXES: .cc .cc.o: $(CXX) $(CXXFLAGS) -c $< .cc : $(CXX) $(CXXFLAGS) $< -o $@ -lm $(TLIB) -lg++ #set up compiler and options CXX = g++ CXXFLAGS = -g $(INCLUDES) # # ******************* program specific options below ************** # usewords.o: hmap.h iterator.h OBJS = usewords.o template.o TEMPSRC = map.h hmap.h hmap.cc \ hiterator.h hiterator.cc template.o: $(TEMPSRC) usewords: $(OBJS) $(CXX) $(CXXFLAGS) -o usewords $(OBJS) $(TLIB) clean: /bin/rm -f *.o *~