Re: Problem in compiling a kernel module

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

 





On Sun, Jul 10, 2011 at 11:03 AM, Prashant Shah <pshah.mumbai@xxxxxxxxx> wrote:
Hi,

On Sun, Jul 10, 2011 at 10:07 AM, Ponkumaran Annadurai
<aspkumaran@xxxxxxxxx> 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
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[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