Makefile 297 B

12345678910111213
  1. PHOTOS_ORIG = $(wildcard *.orig.jpg)
  2. PHOTOS_MIN = $(patsubst %.orig.jpg,%.min.jpg,$(PHOTOS_ORIG))
  3. MIN_WIDTH = 800
  4. CONVERT_OPTIONS = -quality 75 -strip -interlace Plane
  5. all: $(PHOTOS_MIN)
  6. %.min.jpg: %.orig.jpg
  7. convert "$<" -size '$(MIN_WIDTH)x' $(CONVERT_OPTIONS) "$@"
  8. clean:
  9. rm -f *.min.jpg