Absolutely positively do not use a lot of #ifdefs, you're asking for a lot of hurt.
Move the platform specific code into files, and then use abstractions in the main code, pull in the different implementations in the make file. You'll have just a few #ifdefs in the main code for the right header files.
Do frequent compilation across the platforms, because you will screw it up. Make sure to have plenty of tests for the different behavior between platforms.