# build kernel when hack on it



## wsw1wsw2 (Mar 2, 2009)

Hi, 

Every time I add some printf()s to the kernel source and build it. The building system(cd /usr/src && make buildkern KERNCONF=...) will build the whole kernel.(clean all the objects in /usr/obj and rebuild all the objects)

Is there a way to build only file(s) what I've edited just like Linux's Kbuild does?

 Thanks!


----------



## richardpl (Mar 2, 2009)

NO_CLEAN=1 and many more options ....


----------



## crsd (Mar 2, 2009)

-DNO_KERNELCLEAN
check /usr/src/Makefile.inc1 for more defines.


----------



## octix (Mar 5, 2009)

Nice, I was thinking to ask this too 

Thanks!


----------

