Emits compile, archive, shared-link and link actions per target, and applies -fPIC to anything reachable from a shared target.