Hello Sam,

Thanks for your help. As per your suggestion I modified
the Makefile. However I get main.ko in the maind
directory and foobard.ko in foobard directory. These are
two independent kernel modules. I tried several other things
in the Makefile and I did not make any progress to build
one kernel module of the whole tree. Any help on this
will be appreciated.

Now the tree is as:

      testd
       |
       |-- Makefile
       |
       |--maind
       |    |
       |    |-- Makefile
       |    |-- main.c
       |
       |
       |--foobard
       |   |
           |-- Makefile
           |-- foobar1.c
           |-- foobar2.c


The Makefile in the root directory has:

obj-m   := maind/ foobard/


The Makefile in the maind directory has:

obj-m := main.o

The Makefile in the foobard directory has:

obj-m    := foobard.o
foobard-y := foobar1.o foobar2.o

In the testd directory, I run
make -C /usr/src/linux-2.6.11.7 M=$(pwd) modules

Thanks for any help

Regards
Suzzane

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel

Reply via email to