modify makefile and fix unused-variable in the .cpp file