Extract kernel headers from kernel sources
I compiled a kernel from vanialla sources and now I'd like to provide someone else the kernel headers like you can find them in /usr/src/ on a debian system. I know you can do a "make headers_install" but this will only install files in /usr/include. But I also need all the Makefiles that it is possible to compile a kernel module.
I also know that there is the command "make modules_prepare" which will prepare the kernel sources for building external modules. That works fine but the kernel sources are then still included but I need only the headers as far as I know. This results in a total size of about 500MB. The kernel headers from Ubuntu are only about 70MB. So what am I doing wrong?
To clarify this: "make modules_prepares" works perfectly and does what I want but the resulting sources are too big.