use recursion to add node and using makefile to compile the project