Описание тега single-source
Single-Source refers to a single set of program source files that are compiled or otherwise converted to an executable form by compilers, interpreters or other similar tools on more than one operating system or hardware platform. For example, source code that compiles for two or more of Linux, Windows or OS/X, or for two or more of x86, TI-365 or Motorola 604.
Assuming the compilation case, in practical use, code components unique to a particular operating system or hardware platform are bounded in conditional compilation blocks controlled by user or system defined variables (e.g. #define-d C compiler variables). It is also common practice to code these conditional compilation elements into subroutines with names indicating their function and compiler independence. Practical application also prefers that these compiler independent subroutines be coded into separate source files for link time inclusion.