added license and readme

reorganized static error linking macro