Passing on preprocessor macros to the LinkDef file

Dear ROOTers,

(sorry if this has been discussed before, I could not find it anywhere).

I compile my ROOT code as a function of some conditions by passing on prepocessor macro definitions with -D, let’s say

In my code, I then have stuff like:

#ifdef SUNDAY

and this works just fine. However, when I want to do the same in my LinkDef.h file, the variable is not seen:
I have something like:

#ifdef __MAKECINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ nestedclasses;
#pragma link C++ class Work+;
#ifdef SUNDAY
#pragma link C++ class Fun+;
#pragma link C++ namespace myNames;

The LinkDef file does not “see” the SUNDAY variable when it is defined. What do I have to do to pass on this variable to the LinkDef file?

Many thanks in advance!



Yeah, this works just fine. I wasn’t aware of this option of rootcint.
Many thanks for the prompt help!