Do not trust the kernel build tools on macosforge if you want to build Leopard.
Their tools are outdated (as of today) and will give you tons of errors when compiling.
So, better to compile the tools (kext_tools and cctools) from source.
The "Mac OS X Internals" book gives detailed information in Section 6.10.
To fine tune the compile settings, refer to the README file in the xnu package.
After successfully compiling xnu, you need to copy your kernel to the root directory and fix the permissions:
sudo cp BUILD/obj/RELEASE_I386/mach_kernel /my_kernel
sudo chmod 644 /my_kernel && sudo chown root:wheel /my_kernel
ctfconvert.