add the GNUmakefile, create shared library for common codes