On 2013-04-09 17:03:14 (+0530), Sankar P <sankar.curios...@gmail.com> wrote:
> I have some source files: a.c b.c c.c etc. Now I need to generate a
> few .ko files such as, 1.ko, 2.ko, 3.ko etc.
> <SNIP>
> For example, consider the following association between source files
> and the .ko files.
> 
> a.c a.h common.c common.h => 1.ko
> b.c b.h common.c common.h => 2.ko
> 

The following (untested!) should do the trick:
obj-$(CONFIG_MYMOD) += mymod_a.o mymod_b.o
mymod_a-objs += a.o common.o
mymod_b-objs += b.o common.o

I'd probably recommend creating three modules though: a, b and common.

Regards,
Kristof


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to