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