Pass from pointer to reference and change the makefile