bug-make
[Top][All Lists]
Advanced

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

Re: Error in kernel module


From: Mike Shal
Subject: Re: Error in kernel module
Date: Thu, 24 May 2007 09:29:02 -0400

On 5/24/07, ajay parashar <address@hidden> wrote:
Hi,
I am using fedora 6. i write a simple hello world kernel module
i write following makefile for building this module.
###############################

obj-m+=hello.o
all:
    make -c /lib/modules/ $(shell uname -r)/ build M=$(PWD) modules
clean:
       make -c /lib/modules/ $(shell uname -r)/ build M=$(PWD) clean

##############################

The correct flag is -C, not -c. In make --help you can see:

 -C DIRECTORY, --directory=DIRECTORY
                             Change to DIRECTORY before doing anything.

which is what you want (ie: change to the kernel's build directory).
Also make sure you don't actually have any spaces in the path name,
which it looks like you do. Try this:

make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

-Mike




reply via email to

[Prev in Thread] Current Thread [Next in Thread]