legend: clean up makefiles