FILES_IN := $(shell ls *NEF) FILES_OUT := $(FILES_IN:.NEF=.jpg) all: $(FILES_OUT) %.ppm: %.NEF dcraw -o 1 -q 3 -w -v $< %.jpg: %.ppm convert $< -quality 85 $@