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