all: icons/tightgatevnc.ico

.PHONY: clean
clean: clean-icons

ICONS := \
    icons/tightgatevnc_16.png \
    icons/tightgatevnc_22.png \
    icons/tightgatevnc_24.png \
    icons/tightgatevnc_32.png \
    icons/tightgatevnc_48.png \
    icons/tightgatevnc_128.png

.PHONY: icons clean-icons
icons: $(ICONS)

clean-icons:
	rm -f $(ICONS)

icons/tightgatevnc_16.png: tightgatevnc.svg
	convert -scale 16x16 -background transparent "$<" "$@"
icons/tightgatevnc_22.png: tightgatevnc.svg
	convert -scale 22x22 -background transparent "$<" "$@"
icons/tightgatevnc_24.png: tightgatevnc.svg
	convert -scale 24x24 -background transparent "$<" "$@"
icons/tightgatevnc_32.png: tightgatevnc.svg
	convert -scale 32x32 -background transparent "$<" "$@"
icons/tightgatevnc_48.png: tightgatevnc.svg
	convert -scale 48x48 -background transparent "$<" "$@"
icons/tightgatevnc_128.png: tightgatevnc.svg
	convert -scale 128x128 -background transparent "$<" "$@"
icons/tightgatevnc.ico: $(ICONS)
	convert -background transparent $(ICONS) "$@"
