I know this is not a easy job but for some reason I want give it a try.
Trying is always good, so you can learn things
"settings"->"compiler settings"->"#defines"
Always use Projects, never modify the compiler settings.
If you want to use the project as a template for more projects, you can save the project as template and reuse it after...
For variables that remain constant on the machine, like paths, codeblocks has the concept of global variables: Settings->global Variables
There you can create a new Variable and on the right define your sub variables. Later you can use them like ${VAR_NAME.SUB_VAR_NAME} nearly everywhere in codeblocks
If you have per project variables, like version, they should be in Project->Build options->Select the project name on the left->Custom variables. Then you can use this variables like above ${VAR_NAME}
You can use them later in in the Project->Build options->compiler->#defines or in linker and compiler settings
i am not sure, if you can use variables in Project->Build options->Select the project name on the left->Custom variables to combine new variables....