PROBLEMS = $(wildcard tasks/*.mat) RESULTS = $(PROBLEMS:tasks/%=results/%) calculate: problems solutions solutions: results $(RESULTS) results: @mkdir results problems: problems_prepared.stamp tasks: @mkdir tasks problems_prepared.stamp: tasks tasks_builder.m @./tasks_builder.m @touch $@ @echo "Please run again: make calculate" $(RESULTS): results/% : tasks/% ./task_solver.m $< $@ clean: rm -f problems_prepared.stamp rm -rf tasks rm -rf results real_clean: rm -rf L0m.cache