# ========================================================== # Makefile for Computer Programs in Part 1 of Book # # To compile all of the programs, type: make all # To compile individual programs, type: make first # make area # make quad # # Written By: M. Austin January 1996 # ========================================================== CFLAGS = -DDEBUG .cc.o: g++ -c $(CFLAGS) -O $< .c.o: gcc -c -O $< PROGRAM1 = prog_first_program.o PROGRAM2 = prog_area.o PROGRAM3 = prog_quadratic.o PROGRAM4 = prog_rainfall.o # Compile all C Programs. all::first area quad rain # Compile Individual C Programs. first: $(PROGRAM1) gcc $(PROGRAM1) -o FIRST area: $(PROGRAM2) gcc $(PROGRAM2) -lm -o AREA quad: $(PROGRAM3) gcc $(PROGRAM3) -lm -o QUADRATIC rain: $(PROGRAM4) gcc $(PROGRAM4) -lm -o RAINFALL # Remove all object files and program output file. clean: /bin/rm -f *.o /bin/rm -f output-*