1 #!/usr/bin/make -f 2 3 NAMES := wpa_gui ap laptop group invitation 4 SIZES := 16x16 22x22 32x32 48x48 64x64 128x128 5 ICONS := $(addsuffix .png, $(foreach name, $(NAMES), $(foreach size, $(SIZES), $(size)/$(name)))) 6 ICONS += $(addsuffix .xpm, $(NAMES)) 7 8 all: $(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 22 clean: 23 $(RM) -r pixmaps hicolor 24