added functions to write case-Makefiles