update makefile and test virtual destructor