This problem sounds quite familiar to me, im pretty sure his problem is code completion. For code completion to work it needs to know the current compiler configuration. He is using an external Makefile and this configures the compiler, in his case it especially sets certain defines. Apparently codeblocks doesnt read the makefile and therefore code completion runs with a different compiler configuration, especially it doesnt know these defines and code completion will evaluate all #ifdefs querying these defines to false and e.g. show the code parts as disabled.
The problem is actually more complicated, because defines are not the only information code completion needs, e.g. it makes a huge difference if gcc runs in c++ 11 mode or not. I dont know how code completion in CodeBlocks solves this, i have the same problem in Eclipse when using an external Makefile. But in Eclipse, even when using an external Makefile, you can still set compiler defines, include paths and compiler command line parameters so that its code completion can query the compiler internal defines and other settings. But in CodeBlocks these settings are all missing for a custom Makefile project, so he cant adjust the compiler configuration that code completion sees to the one that his makefile actually uses to compile the code.
In his case adjusting the global compiler configuration doesnt work because his project uses different settings per target, he needs the target specific settings to be available.