# -*- make -*-
# FILE: "/home/tv/TextGrid/Software/Workspaces/After-Reorg/base-info.textgrid.lab.core.application/resources/Makefile"
# LAST MODIFICATION: "Do, 10 Mai 2012 17:59:40 +0200 (tv)"
# (C) 2009 by Thorsten Vitt, <vitt@informatik.hu-berlin.de>
# $Id:$

ICON=Icon-Eule

default : win mac linux window-icons

win : $(ICON).ico

mac : $(ICON).icns

linux : $(ICON)_128x128.xpm

window-icons : $(ICON)_16x16.gif $(ICON)_32x32.gif $(ICON)_48x48.gif $(ICON)_64x64.gif $(ICON)_128x128.gif $(ICON)_16x16.png $(ICON)_32x32.png $(ICON)_48x48.png $(ICON)_64x64.png $(ICON)_128x128.png

%_256x256.png : %.svg
	inkscape --without-gui --export-png=$@ --export-width=256 --export-height=256 $^


%_128x128.png : %.svg
	inkscape --without-gui --export-png=$@ --export-width=128 --export-height=128 $^

%_64x64.png : %.svg
	inkscape --without-gui --export-png=$@ --export-width=64 --export-height=64 $^

%_48x48.png : %.svg
	inkscape --without-gui --export-png=$@ --export-width=48 --export-height=48 $^


%_32x32.png : %.svg
	inkscape --without-gui --export-png=$@ --export-width=32 --export-height=32 $^


%_16x16.png : %.svg
	inkscape --without-gui --export-png=$@ --export-width=16 --export-height=16 $^

%-256.png : %.png
	convert -type Palette -colors 256 $< $@

%.xpm : %.png
	convert $^ $@

%.gif : %.png
	convert $^ $@


# You need icnsutils for that
%.icns : %_256x256.png %_128x128.png %_48x48.png %_32x32.png %_16x16.png
	png2icns $@ $^

# You need icoutils for that
%.ico : %_16x16-256.png %_16x16.png %_32x32-256.png %_32x32.png %_48x48-256.png %_48x48.png 
	icotool -o $@ -c $^
