Re: Trouble making module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi guys,

On Tue, Oct 12, 2010 at 6:46 AM, Wouter Simons <lkml@xxxxxxxxxxxxxxxx> wrote:
> On 10/12/2010 12:30 PM, shivanth m p wrote:
...snip...
> all:
>        obj-m           += modname.o
>        modname-y       := mydriver.o

That's definitely not going to work.

You're trying to put make variable assignments inside a recipie. Make
will try to execute a program called obj-m and then try to execute a
program called modname-y.

obj-m += modname.o

outside a recipie is correct for kernel makefiles.

> Make is not giving the error, I think it is the Kbuild system
> determining that there is nothing to be done for your files because
> there are no objects to be placed in your module. The documentation on
> making makefiles for your projects is in Documentation/kbuild

The Kbuild system is implemented using make.

Make gives the error when it parses the makefile and decides that
there is nothing to be done, i.e. all targets are up to date.

The error is essentially saying that mydriver.o already exists and is
newer than mydriver.c.

It would help if you could copy and paste the exact error, along with
all of the other output of running make.

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux