$(CODEBLOCKS) is automatically defined by CB in macrosmanger. The user does not need to define it anywhere.
Are you getting errors when compiling codesnippets ?
The use of $(CODEBLOCKS) makes it easy to drag a contrib dir out of the local repo to a new separate directory and work with the contrib without .cbp changes. Then drag it back to the repo without making mistakes trying to fix the .cbp file. No changes, no mistakes.
Without using the macro, you cannot use the repo .cbp without making ../../.. changes all over the place, It is much easier to use $(CODEBLOCKS)\..\ without making any changes to the .cbp(s) and the macro is build into the sdk source code builtin variables.
https://wiki.codeblocks.org/index.php/Variable_expansion