I'm not sure whether it's worth the work to put all in one binary, because the whole implementation stuff is different for console apps and gui apps.
The only way would be to create a console app, that parses the commandline and then does the gui initialisation manually (starting the main message loop, loading gui related libs, etc.).
This might be an option for the future, but the first step is to split the relevant files in a base and a gui part, with as less changes to the api as possible (preferred is of course to have no changes), to minmize the work on plugins and other not used parts of the sources (not used for console of course).
The problem is, that the gui-related things are not available (not even defined) for console apps, so an extra build-target, that creates a pure console-app is the easiest way at the moment.
I put the whole sources int a svn-repo on my server :
svn://jenslody.de/codeblocks-console/trunk (no websvn, only anonymous read-access, write access is only possible via ssh with publickey authorization).
Be warned: the code is really ugly at the moment. It has a lot of ifdefs and splitting into two parts is in a very early stage (many commented out parts etc.).
No optimization or something similar, just making it work.
By the way, it's only needed for OSes that have real consoles like linux, not for windows, so there are no changes to windows project-file.
And the Makefile.am's are not updated to use the splitted files, but this will come (probably today).