Question: I'm working on a multi-platform project. I want a simple and quick way of managing OS-specific includes, preferably without any external tools.

I would like something like this (which I'm well aware won't work)

```
#define PLATFORM_A 1
#define PLATFORM_B 2

#ifndef TARGET_PLATFORM
//ERROR
#endif

#if TARGET_PLATFORM == PLATFORM_A
    #define DIR "a"
#elif TARGET_PLATFORM == PLATFORM_B
    #define DIR "b"

#define PLATFORM_INCLUDE(file) \
    #include "platforms/" DIR "/" file

```

Answer: 
If you have same file tree for different platfroms you could specify only file name for include file in the source code and use platform dependent include directory. This directory could be easily configured by environment variable.
You can have preprocessor directives defined by the platform itself. In this way you can use:

```
#ifndef MAC // MAC performs #define MAC

#ifndef WINDOWS // Windows performs #define WINDOWS

#ifndef UNIX // Unix performs #define UNIX

// ERROR

#endif

#endif

#endif

```