Updated linkwith to include required/optional frameworks.