# Makefile downloaded from http://matt.blissett.me.uk/apps/scripts/offline-photos-android-phone/
#

PHOTOS = $(shell find -L Source/[12M]* -type f -name '*.jpg')
# Adjust this bit:       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  to match all the photographs you want on the phone.

SHRUNK = $(patsubst Source/%.jpg, Albums/%.jpg, $(PHOTOS))

.PHONY: all
all: $(SHRUNK)

Albums/%.jpg: Source/%.jpg
	@mkdir -p "$(@D)"
	convert "$<" -resize '2000x2000>' -quality 40 "$@"
	touch -r "$<" "$@"
