On Sat, May 21, 2005 at 04:29:35PM +0530, Kedar Sovani wrote:
> One of the question that I haven't yet managed to solve properly is
> how do we manage kernel modules which have its C files in multiple
> underlying directories.
>
> say :
> /src/Makefile
> /src/main.c
> /src/module1/Makefile
> /src/module1/module1.c
> /src/module1/module_stuff.c
>
> And the 3 C files should be built into a single module at the top level.
> I tried something like this in the top level Makefile, but it does not work.
>
> obj-m += mymodule.o
> main-objs=main.o module1/
This create a number of modules - sometimes a good way to do it.
We have several examples in the kernel using this method.
>
> I could use,
> main-objs=main.o module1/module1.o module1/module_stuff.o
>
> But I don't think that is a good idea. I looked at
> Documentation/kbuild/, but no luck.
This is one way to do it.
The other way as used by the kernel is to avoid spreading the .c
files in multiple directories.
Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]