.PHONY : all clean PNG_FILES = $(patsubst %.dot,%.png,$(wildcard *.dot)) all: $(PNG_FILES) %.png: %.dot dot -Tpng $< -o $@ clean: rm -f *.png