# Makefile # CMSC-341 Spring 2004 Project3 # Thanks to Tom Anastasio for his original # Directory containing public code specifically for Project 3 DIR1 = . PROJ = Proj4 CC = /usr/local/bin/g++ CCFLAGS = -g -ansi -Wall -I . -I $(DIR1) # These are the files that students must write for this project. # They are to be submitted. SOURCES = \ Proj4.C \ Proj4Aux.C \ BinarySearchTree.C \ QuadProbing.C # These are the files that have been provided to the students. # They are not to be submitted. PROVIDED_SOURCES= # These are the object files resulting from provided source code # as well as from student-written source code OBJECTS = Proj4Aux.o Proj4.o # The big daddy compilation rule. Links all the objects. $(PROJ): $(PROJ).C $(OBJECTS) $(CC) $(CCFLAGS) -o $(PROJ) $(OBJECTS) # The following rules make (compile) the various object files ################ Proj4Aux.o: Proj4Aux.C Proj4Aux.H $(CC) $(CCFLAGS) -c Proj4Aux.C #BinarySearchTree.o: BinarySearchTree.C BinarySearchTree.H # $(CC) $(CCFLAGS) -c BinarySearchTree.C ################ # Utility for printing the code you have written for the project. # Typing 'make print' produces a PostScript file named $(PROJ).ps # to be printed on an appropriate PS printer such as acsps. PRINTPGM = a2ps PRINTFLAGS = -nP PRINTFILE = $(PROJ).ps .PHONY: print print: $(SOURCES) - $(PRINTPGM) $(PRINTFLAGS) $(SOURCES) Makefile > $(PRINTFILE) # Utility for printing all the code -- both the code you have written # and the code that was provided for the project. # Typing 'make printall' produces a PostScript file named $(PROJ).ps # to be printed on an appropriate PS printer such as acsps. .PHONY: printall printall: $(SOURCES) $(PROVIDED_SOURCES) - $(PRINTPGM) $(PRINTFLAGS) \ $(SOURCES) $(PROVIDED_SOURCES) Makefile > $(PRINTFILE) # Utility for submitting your files. Typing 'make submit' # submits the files for you. # SUBMITCLASS should be the same for all sections of 341 SUBMITCLASS = cs341 .PHONY: submit submit: submit $(SUBMITCLASS) $(PROJ) $(SOURCES) Makefile # Utilities for cleaning up your directory. .PHONY: clean clean: - rm -f *.o; rm -f core.*; rm -f $(PROJ)