TARGETS += $(patsubst data/%.txt, decodes/%.csv, $(wildcard data/*.txt)) TARGETS += $(patsubst data/%.csv, decodes/%.csv, $(wildcard data/*.csv)) all: $(TARGETS) decodes/%.csv: data/%.txt sunburst.py ./sunburst.py --outfile $@ $< decodes/%.csv: data/%.csv sunburst.py ./sunburst.py --outfile $@ $<