Is it easy to port a game from mobile to desktop?

Hey,

I would like to develop a game on desktop (OS X) and port it later to mobile (iOS, maybe Android).
How difficult is this and do I need to change code/ressources?

Thanks