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


Now, on reboot simply tell the boot loader to load your kernel instead of the default mach_kernel:
> my_kernel

PS: There are some annoying complaints about missing of ctfconvert.
ctfconvert is supposed to come with dtrace, but when I tried to build dtrace from source I got errors about missing header files from libiberty. I didn't investigate further beyond that. THe missing of ctfconvert seems irrelevant here.