Besides #define in the code, preprocessor values can be given as part of the gcc command as well.
The following code defines TRACE. (-D+ name need to define)
bash$ gcc -Wall -g -DTRACE -o ifdef ifdef.c