[makefile] revamp makefile with stamp files