Used $(CURDIR) instead of pwd in generating shared library on Mac OSX. Add more tips about this issue. Thank Dr Kane O'Donnell.