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