What makes you think you have done something wrong?
You should be seeing version
in the "Variables" section of the documentation page for that source file. If you've enabled source code output, the variable version
should hyperlink to that variable documentation.
Your documentation will look much better if you preface the definition of the variable with a doxygen comment. Continuing with this example,
//! Define a constant string type.
//! @deprecated Use the typedef const_string_t instead.
#define CONST_STRING const char *
//! Software version number
static CONST_STRING version = "2.xx";