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

Re: Makefile problem



Hi,
 Try following Makefile
obj-m   := hello.o

KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD       := $(shell pwd)

all:
        $(MAKE) -C $(KERNELDIR) M=$(PWD)

clean:
        rm -rf *.o  .*.cmd *.ko *.mod.c
regards,
Parag.



On 12/16/05, madhan lp <madhan.lp@xxxxxxxxx> wrote:
Hi All,
 
I am facing a problem while trying to build my modules using make.
 
Please find below the Makefile that i am using:
 
obj-m:=hello.o
 
all:
make -C /usr/src/linux-2.6.14.3 M='pwd' modules
 
clean:
make -C /usr/src/linux-2.6.14.3 M='pwd' clean
 
and when i run make from the prompt this is the error that i am getting:
make: Nothing to be done for `all'.
 
Can anyone help me out with this. Also if theres some other way to build modules with out the makefile then let me know.
 
Thanks in advance,
 
Madhan.