If your project is a makefile project then simply do what Francois said in the comments.
If you are looking at trying to build a specific configuration, it depends on which CDT Version you have, as if you can do that.
By default the headless builder will build ALL configurations specified in the project. At work we have the original CDT 7.0 version and that one did not support building a specific configuration, but I do see in the notes on CDT 7.0 that it does support building a specific configuration. You would do that by using -build App/Config
instead of just -build App
.
(Note: at home I have eclipse with CDT 7.0.2 and that does support the headless build of a specific configuration as above, although the usage info still doesn't show support for it, and the upcoming CDT 8.0 does correctly show the usage information).