# Makefile # CMSC-341 Fall 2001 Project2 # Kyu Bae xxx-xx-5868 - Section 201 # kyu_bae@yahoo.com / kbae1@umbc.edu # created: 20 September 2001 # current: 30 September 2001 PROJ = Proj2 CC = g++ CCFLAGS = -g -ansi -Wall -I . -I $(DIR1) # Directory containing textbook code such as DIR1 = /afs/umbc.edu/users/d/e/dennis/pub/CMSC341 # These are the files that students must write for this project. # They are to be submitted. SOURCES = \ Proj2.C\ LinkedList.H\ LinkedList.C\ Data.H\ Data.C\ # These are the files that have been provided to the students. # They are not to be submitted. PROVIDED_SOURCES = \ $(DIR1)/dsexceptions.h # These are the object files resulting from provided source code # as well as from student-written source code OBJECTS = \ Proj2.o \ Data.o # The big daddy compilation rule. Links all the objects. $(PROJ): $(OBJECTS) $(CC) $(CCFLAGS) -o $(PROJ) $(OBJECTS) # The following rules make (compile) the various object files ################ Data.o: Data.C Data.H $(CC) $(CCFLAGS) -c Data.C Proj2.o: Proj2.C $(CC) $(CCFLAGS) -c Proj2.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. # 'make clean' removes emacs backup files # 'make cleaner' also removes all object files # 'make cleanest' also removes core, the executable, and # the ii_files directory created by the SGI compiler .PHONY: clean .PHONY: cleaner .PHONY: cleanest clean: - rm -f *# *~ cleaner: clean - rm -f *.o cleanest: cleaner - rm -f core; rm -f $(PROJ); rm -rf ii_files