Then you have to read the master_build script and modify it for your needs.I'm not using kartal but the one downloaded from cm.
yesRegarding the lights.c then I just have to include that library on the same directory you put it in your kernel AND add the changes you pointed to here http://forum.xda-developers.com/showpost.php?p=49958578&postcount=215 and I would be set?