run configure script from build.pl, simplify Makefiles for build