Limit the number of flags directly given to the linker, and refactor rpath

This will make things easier for MSVC support.
2 files changed