update Makefile for shared library, update debug function in node.c