all: $(subst c,exe,$(shell ls *.c)) %.exe: %.c gcc $< -o $@ -lm .PHONY: all clean clean: rm *.exe