# generic makefile for cps 108/cps100 #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 ************** # testjotto.o: compplayer.h compplayer.o: compplayer.h player.h player.o: player.h JOBS = testjotto.o player.o compplayer.o jotto: $(JOBS) $(CXX) $(CXXFLAGS) -o $@ $(JOBS) $(TLIB) clean: /bin/rm -f *.o *~