To answer my own question.
I found on the Settings Menu->Compiler->Other settings->Advanced settings button->Command->Generate dependencies for file->Command $compiler -MM $options -MF $dep_object -MT $object $includes $file
Evidently it is done behind the scene by code::blocks.
Thanks for the reply.