You have to have the #define
at the beginning of all your files that need that macro defined, or through including a .h
file that has it in it.
If you want a cleaner way of doing that, then it is probably better to use the compiler flags to set environmental variables.
For example
icpc -DDEBUG=whatever source.c ...
Or even better, you can enable this compiler flag though an environmental variable in your makefile.