I have a makefile that I use to compress pictures:
src=$(wildcard Photos/*.jpg) $(wildcard Photos/*.JPG)
out=$(subst Photos,Compressed,$(src))
all : $(out)
Generally having spaces in file names is a bad idea with make, but for your case this may work:
src=$(shell find Photos/ -iname '*.JPG' | sed 's/ /\\ /g')
out=$(subst Photos,Compressed,$(src))
all : $(out)
Compressed:
@mkdir Compressed
Compressed/%: Photos/% Compressed
@echo "Compressing $<"
@convert "$<" -scale 20% "$@"