CFLAGS=-lm C_FILES=$(shell find . -name '*.*') TARGETS=$(notdir $(basename ${C_FILES})) all: ${TARGETS} @for target in ${TARGETS}; do \ grep -q $${target} ../../.gitignore || echo $${target} >> ../../.gitignore; \ done clean: rm -f ${TARGETS}