I've often wished for compile-time variables. However, the easiest thing to do would just be to define constants for each one invididually.
The answer above me's thread problem could be solved by the use of a functionoid in some global state class or a similar sort of solution if you're using C rather than C++.
You could also try using an xmacro. Create a new file, let's call it xmacro.h
INCREMENTING_CONSTANT;
#define INCREMENTING_CONSTANT INCREMENTING_CONSTANT + 1
Then, in a standard header,
#define INCREMENTING_CONSTANT 0
#define USE_INCREMENTING_CONSTANT #include "xmacro.h"
const int x = USE_INCREMENTING_CONSTANT
I haven't tested this, but xmacros have some awesome power that regular macros can't use, like defs/undefs, and my gut says it should work. The preprocessor is powerful, but rather dumb, so it could fail.