PROBLEMS = $(wildcard tasks/*.mat) RESULTS = $(PROBLEMS:tasks/%=results/%) calculate: $(RESULTS) $(RESULTS): results/% : tasks/% ./task_solver.m $< $@ real_clean: rm -f $(RESULTS)