split buildscript and makefile