Wildcard targets in a Makefile
The concept is called pattern rules. You can read about it in GNU make manual. $(GRAPHDIR)/%.png: $(GRAPHDIR)/%.dot dot $< -Tpng -o $@ graphs: $(patsubst %,$(GRAPHDIR)/%.png, Complex Simple IFileReader McCabe)\ or just %.png: %.dot dot $< -Tpng -o $@ graphs: $(patsubst %,$(GRAPHDIR)/%.png, Complex Simple IFileReader McCabe) You can also remove all repetition by extracting one of … Read more