refactoring makefile
avoid rewrit to a free memory block