############################################### # makefile4 (Pattern Rules) ############################################### ############################################### # Pattern rules ############################################### %.o: %.c gcc -Wall -ansi -pedantic -c -o $@ $< ############################################### # Build rules for non-file targets ############################################### all: testmymath clobber: clean rm -f *~ \#*\# core clean: rm -f testmymath *.o ############################################### # Build rules for file targets ############################################### testmymath: testmymath.o mymath.o gcc -o $@ $< mymath.o testmymath.o: mymath.h mymath.o: mymath.h