You cannot compile wxWidgets with Code::Blocks in an easy way at this time.
makefile.gcc is the way to go. For this to work, you have to make sure that you have make 3.8 (older versions will not do) and you must make sure that no other conflicting make or gcc is in the path (this is most easily done by simply setting the path to the one directory where your build tools live before building).
With the correct version and path set up, makefile.gcc works fine.