Doc fix: separate link and compile flags to prevent warnings