Problem in compiling a kernel module
Ponkumaran Annadurai
aspkumaran at gmail.com
Sun Jul 10 02:06:48 EDT 2011
On Sun, Jul 10, 2011 at 11:03 AM, Prashant Shah <pshah.mumbai at gmail.com>wrote:
> Hi,
>
> On Sun, Jul 10, 2011 at 10:07 AM, Ponkumaran Annadurai
> <aspkumaran at gmail.com> wrote:
> > 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
More information about the Kernelnewbies
mailing list