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