Thread (10 messages) 10 messages, 3 authors, 2011-07-10

Problem in compiling a kernel module

From: Ponkumaran Annadurai <hidden>
Date: 2011-07-10 06:06:48

On Sun, Jul 10, 2011 at 11:03 AM, Prashant Shah [off-list ref]wrote:
Hi,

On Sun, Jul 10, 2011 at 10:07 AM, Ponkumaran Annadurai
[off-list ref] wrote:
quoted
 I am trying to compile a sample hello world module, but when issue make
command, it says that "make: Nothing to be done for `all'.".


------------------- Makefile --------------------------
obj-m += testmod.o

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

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

clean:
               rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions

depend .depend dep:
               $(CC) $(CFLAGS) -M *.c > .depend

ifeq (.depend,$(wildcard .depend))
       include .depend
endif

------------------------------------------------------------------
when I tried your script it prompted that there might be tab instead of
eight spaces. So I inserted 8 spaces there, but it still prompted the same.
Also I couldn't understand the script (particularly $(MAKE) - what does the
variable stands for? also the rest of the code after "depend.depend.dep").
If you can explain the script, I shall know how to edit the script for my
file.

-- 
kumaran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110710/4493c70b/attachment.html 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help