I\'ve used a code base before that had a macro system for enabling and disabling sections of code. It looked something like the following:
#define IN_USE
Just don't define it if it is not in use
#if defined( WIN32 )
#define FEATURE_A
#define FEATURE_B
#else if defined( OSX )
#define FEATURE_C
#else
#endif
Then In you code:
void DoFeatures()
{
#ifdef FEATURE_A
// Feature A code...
#endif
#ifdef FEATURE_B
// Feature B code...
#endif
#ifdef FEATURE_C
// Feature C code...
#endif
#ifdef FEATURE_D // Compile error since FEATURE_D was never defined
// Feature D code...
#endif
}