refactory the Makefile in alp,blp to be efficient