PNG=$(wildcard *.png)
BUILD=$(PNG:=.touch)
UPNG=$(wildcard *.PNG)
UBUILD=$(UPNG:=.touch)

all: $(BUILD) $(UBUILD)

%.png.touch: %.png
	pngtopnm -mix -background "#FFFFFF" $< | pnmtopng > $<.tmp
	mv $<.tmp $<
	touch $@

%.PNG.touch: %.PNG
	pngtopnm -mix -background "#FFFFFF" $< | pnmtopng > $<.tmp
	mv $<.tmp $<
	touch $@

commit: all
	cvs commit -m 'Changed background to white' *.png *.PNG

clean:
	rm -fv $(BUILD) $(UBUILD)

.PHONY: all clean commit
