Your question actually consists of two questions:
1) How to write your own C ++ code to include the necessary include files on the correct platform?
2) How to write my Makefile to work on different platforms?
++ - , , .
Automake scons , . "" make . Windows GNU Make for Windows ( nmake , .