############################################### # makefile5 (Pattern Rules) ############################################### ############################################### # Macros ############################################### CC = gcc # CC = gccmeminfo CFLAGS = -Wall -ansi -pedantic # CFLAGS = -Wall -ansi -pedantic -g # CFLAGS = -Wall -ansi -pedantic -DNDEBUG # CFLAGS = -Wall -ansi -pedantic -DNDEBUG -O3 ############################################### # Pattern rules ############################################### %.o: %.c $(CC) $(CFLAGS) -c -o $@ $< ############################################### # Build rules for non-file targets ############################################### all: testintmath clobber: clean rm -f *~ \#*\# core clean: rm -f *.o testintmath ############################################### # Build rules for file targets ############################################### testintmath: testintmath.o intmath.o $(CC) -o $@ $< intmath.o testintmath.o: intmath.h intmath.o: intmath.h