programs := $(patsubst %.c, bin/%, $(wildcard *.c))
all: bin $(programs)
bin:
mkdir bin
bin/% : %.c
gcc -g -o $@ $<
clean :
rm $(programs)