# ========================================================== # Applications Programs in Part 2 of Austin and Mazzoni. # # Applications include lists, hash tables, and polygons # # To compile all of the programs, type: make all # To compile individual programs, type: make list # make genlist # make ..... # # To remove object files, type: make clean # # Written By: M. Austin October 1995 # ========================================================== # Define compiler options for .c files .c.o: gcc -c -O $< # Setup macros for individual computer programs. MISC = miscellaneous.o PROG1 = prog_numlist.o numlist.o PROG2 = prog_setops.o numlist.o PROG3 = prog_hashfunction.o PROG4 = prog_hashtable.o hashtable.o PROG5 = prog_bubble1.o PROG6 = prog_bubble2.o PROG7 = prog_qsort.o PROG8 = prog_polygon1.o polygon.o polygon_properties.o # Compile all C Programs. all:: numlist setop hash1 hash2 bubble1 bubble2 qsort polygon1 # Compile Individual C Programs. numlist: $(MISC) $(PROG1) gcc $(MISC) $(PROG1) -lm -o LIST setop: $(MISC) $(PROG2) gcc $(MISC) $(PROG2) -lm -o SETOPS hash1: $(PROG3) gcc $(PROG3) -lm -o HASHFUNCTION hash2: $(MISC) $(PROG4) gcc $(MISC) $(PROG4) -lm -o HASHTABLE bubble1: $(PROG5) gcc $(PROG5) -lm -o BUBBLE1 bubble2: $(PROG6) gcc $(PROG6) -lm -o BUBBLE2 qsort: $(PROG7) gcc $(PROG7) -lm -o QSORT polygon1: $(MISC) $(PROG8) gcc $(MISC) $(PROG8) -lm -o POLYGON1 # Remove all object files and program output files. clean: /bin/rm -f *.o /bin/rm -f output-*