Fixed linking

Changes:
- Removed `target/` from ‘make clean’, because otherwise it deletes the
dependency libraries as well.
- Added linking to `make rlib`.
- Added linking to `make dylib`.