CC =gcc CFLAGS =-O3 LDFLAGS= .PHONY: clean all all: for arq in *.c; do make `echo $$arq | sed 's/\(.\+\)\.c/\1/'`; done .c: $(CC) $(CFLAGS) $@.c $(LDFLAGS) -o $@ clean: -for arq in *; \ do \ [ -f $$arq ] && \ [ -x $$arq ] && \ [ ! -d $$arq ] && \ rm -i $$arq; \ done rm -f *.o *~