TARGETS=robolock.icns robolock.ico robolock.xpm PNGS=$(wildcard *.png) RGBA_PNGS=$(patsubst %,rgba/%,$(PNGS)) .PHONY: all all: $(TARGETS) rm -rf rgba .PHONY: clean clean: rm -rf rgba rm -f $(TARGETS) .PHONY: install-tools install-tools: echo apt-get install icnsutils icoutils imagemagick rgba/%.png: %.png mkdir -p rgba convert $^ PNG32:$@ robolock.icns: $(filter-out %_24.png %_64.png,$(RGBA_PNGS)) png2icns $@ $^ robolock.ico: $(PNGS) icotool --create --output $@ $^ robolock.xpm: robot_32.png convert $^ $@