updated to build rlib and dylib