Makefile 788 B

1234567891011121314151617181920212223
  1. #!/usr/bin/make -f
  2. NAMES := wpa_gui ap laptop group invitation
  3. SIZES := 16x16 22x22 32x32 48x48 64x64 128x128
  4. ICONS := $(addsuffix .png, $(foreach name, $(NAMES), $(foreach size, $(SIZES), $(size)/$(name))))
  5. ICONS += $(addsuffix .xpm, $(NAMES))
  6. all: $(ICONS)
  7. %.png:
  8. mkdir -p hicolor/$(word 1, $(subst /, ,$(@)))/apps/
  9. inkscape $(subst .png,.svg, $(word 2, $(subst /, , $(@)))) --without-gui \
  10. --export-width=$(word 1, $(subst x, , $(@))) \
  11. --export-height=$(word 2, $(subst x, , $(subst /, , $(@)))) \
  12. --export-png=hicolor/$(word 1, $(subst /, ,$(@)))/apps/$(word 2, $(subst /, , $@))
  13. %.xpm:
  14. mkdir -p pixmaps/
  15. convert hicolor/16x16/apps/$(@:.xpm=.png) pixmaps/$(@:.xpm=-16.xpm)
  16. convert hicolor/32x32/apps/$(@:.xpm=.png) pixmaps/$@
  17. clean:
  18. $(RM) -r pixmaps hicolor