Skip to content

Instantly share code, notes, and snippets.

@nateabele
Created September 10, 2014 20:29
Show Gist options
  • Select an option

  • Save nateabele/49f47b80cc28b0985516 to your computer and use it in GitHub Desktop.

Select an option

Save nateabele/49f47b80cc28b0985516 to your computer and use it in GitHub Desktop.
Cross-platform tool for generating icons from PNGs, see https://korewanetadesu.com/make-icons.html
ICONUTIL := $(word 1, $(shell command -v iconutil icnsutil) iconutil)
.SECONDEXPANSION:
%.icns: %.iconset $$(wildcard $$(@D)/$$*.iconset/icon_*.png)
$(ICONUTIL) -c icns -o $@ $<
.SECONDEXPANSION:
%.ico: %.iconset $$(wildcard $$(@D)/$$*.iconset/icon_*[0-9].png)
convert -background transparent -colors 256 $(filter-out $<,$^) $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment