Here is step by step procedure for LINUX KERNEL compilation inside Eclipse-CDT.
1) Download Eclipse-CDT and install
$ sudo apt-get install eclipse-cdt
2) Make a directory which holds kernel source
$ mkdir kernel_source
and copy kernel source code inside to this,
$ cp linux.x.xx/ kernel_source/ -r
3) Configure kernel with following options enabled, if your are looking for debugging kernel
$ make menuconfig
Enter inside Kernel Hacking section; select Kernel Debugging; check “Compile the kernel with debug info” and “Compile the kernel with frame pointers”.
4) Open Eclipse
In order to save time, just disable automatic building and indexing, by navigating through following options,
Go to Window –> Preference –> General –> Workspace and disable the option “Build automatically”. To disable indexing, visit Window –> Preference –> General –> C/C++ –> Indexer. Select “No Indexer”.
To proceed, select File –> New –> C Project. Give a name to your project, uncheck “Use Default Location” and browse to your kernel source-code directory. From Project Type, select Makefile Project –> Empty Project. If you want to cross-compile the kernel, and you already have some other tool chain installed, you can choose it from “Toolchain”. Click Finish to complete this initial step.
5) Compiling linux kernel
Right click on the audhil directory, and select Build project option, Kernel will start to compile as shown below.