Convert testscript to Makefile