2001-07-12 15:04:21

by Emmanuel Varagnat

[permalink] [raw]
Subject: Makefile problem and modules


I wrote a module for IPv6 but there is a case when it is
compiled.
(For the moment my code can only work as a module...)
When IPv6 is compiled as a module, my module is well compiled.
But if IPv6 is directly in the kernel, my module is not take
into account (I've got no object file).

Here is the only line I added to the Makefile (near the end):

obj-$(CONFIG_IPV6_MYSTUFF) += mystuff.o

Thanks in advance.

-Manu


2001-07-12 15:20:11

by Giacomo A. Catenazzi

[permalink] [raw]
Subject: Re: Makefile problem and modules

Emmanuel Varagnat wrote:

> I wrote a module for IPv6 but there is a case when it is
> compiled.
> (For the moment my code can only work as a module...)
> When IPv6 is compiled as a module, my module is well compiled.
> But if IPv6 is directly in the kernel, my module is not take
> into account (I've got no object file).
>
> Here is the only line I added to the Makefile (near the end):
>
> obj-$(CONFIG_IPV6_MYSTUFF) += mystuff.o
>

Changes in the Config.in file?


giacomo

2001-07-12 15:37:13

by Emmanuel Varagnat

[permalink] [raw]
Subject: Re: Makefile problem and modules

Giacomo Catenazzi wrote:
>
> Emmanuel Varagnat wrote:
>
> > I wrote a module for IPv6 but there is a case when it is
> > compiled.
> > (For the moment my code can only work as a module...)
> > When IPv6 is compiled as a module, my module is well compiled.
> > But if IPv6 is directly in the kernel, my module is not take
> > into account (I've got no object file).
> >
> > Here is the only line I added to the Makefile (near the end):
> >
> > obj-$(CONFIG_IPV6_MYSTUFF) += mystuff.o
> >
>
> Changes in the Config.in file?

Yes just a tristate option.
And after doing config/menuconfig/xconfig, the .config file
contain a line with CONFIG_IPV6_MYSTUFF=m

I can't figure out where it comes from.
I must say I also read Documentation/kbuild/makefiles.txt.

Thanks.

-Manu

2001-07-13 23:01:39

by Andrzej Krzysztofowicz

[permalink] [raw]
Subject: Re: Makefile problem and modules

> I wrote a module for IPv6 but there is a case when it is
> compiled.
> (For the moment my code can only work as a module...)
> When IPv6 is compiled as a module, my module is well compiled.
> But if IPv6 is directly in the kernel, my module is not take
> into account (I've got no object file).
>
> Here is the only line I added to the Makefile (near the end):
>
> obj-$(CONFIG_IPV6_MYSTUFF) += mystuff.o

In which directory? net/ipv6/ ?

Maybe you need to add

subdir-m += ipv6

in net/Makefile then.
net/ipv6 is not processed during module compilation when CONFIG_IPV6=y
(except net/ipv6/netfilter).

Andrzej