perl script for creating Makefile