SHELL := bash PICS := $(wildcard sony/DSC?????.jpg htc/IMG_*_??????.jpg) SMALL := $(PICS:.jpg=_small.jpg) THUMB := $(PICS:.jpg=_thumb.jpg) all: wtf $(SMALL) $(THUMB) small.zip big.zip ./jpg2html.sh %_small.jpg: %.jpg exiftran -a -i $< convert -scale 800x600 $< $@ %_thumb.jpg: %_small.jpg convert -scale 80x80 $< $@ big.zip: $(PICS) zip -r $@ $^ small.zip: $(SMALL) zip -r $@ $^ wtf: rm -f {sony,htc}/socialshareprivacy cd sony; ln -s ../socialshareprivacy/ cd htc; ln -s ../socialshareprivacy/ .PHONY: all clean wtf clean: rm -rf {htc,sony}/*_{small,thumb}.jpg {htc,sony}/*.html index.html *.zip {sony,htc}/socialshareprivacy