I doubt this was designed as an anti-ship weapon. Although it could certainly be used as one given the proper electronics and guidance.
It just seems kind of a waste to make such a huge ballistic missile for a mission like that. Unless the target is an aircraft carrier or something like that. I think it is way more likely this is intended as a system to make theater strikes against hardened enemy bases or other high value strategic targets.