title: Why is make printing "make: Nothing to be done for `all'."?
body: <p>This is a "Hello.c" module and "Makefile". After executing <code>make</code> from the woking directory I get the following message:</p>
  
  <blockquote>
    <p>make: Nothing to be done for `all'.</p>
  </blockquote>
  
  <p>This is the "Hello.c" file:</p>
  
  <pre><code>#include &lt;linux/module.h&gt;    // included for all kernel modules
  #include &lt;linux/kernel.h&gt;    // included for KERN_INFO
  #include &lt;linux/init.h&gt;      // included for __init and __exit macros
  
  MODULE_LICENSE("GPL");
  MODULE_AUTHOR("Lakshmanan");
  MODULE_DESCRIPTION("A Simple Hello World module");
  
  static int __init hello_init(void) {
    printk(KERN_INFO "Hello world!\n");
    return 0;    // Non-zero return means that the module couldn't be
  }
  
  static void __exit hello_cleanup(void) {
      printk(KERN_INFO "Cleaning up module.\n");
  }   
  
  module_init(hello_init); 
  module_exit(hello_cleanup);
  </code></pre>
  
  <p>And "Makefile":</p>
  
  <pre><code>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
  </code></pre>
  
  <p>I tried all suggestions and I got this in the terminal:</p>
  
  <pre><code>root@stupid-HP:/home/stupid/cpz/module$ pwd
  /home/stupid/cpz/module
  root@stupid-HP:/home/stupid/cpz/module$ ls
  hello.c  Makefile
  root@stupid-HP:/home/stupid/cpz/module$ make
  make: Nothing to be done for `all'.
  root@stupid-HP:/home/stupid/cpz/module$ make clean
  make: Nothing to be done for `clean'.
  root@stupid-HP:/home/stupid/cpz/module$ make clean all
  make: Nothing to be done for `clean'.
  make: Nothing to be done for `all'.
  root@stupid-HP:/home/stupid/cpz/module$ ls
  hello.c  Makefile
  root@stupid-HP:/home/stupid/cpz/module$ make
  make: Nothing to be done for `all'.
  root@stupid-HP:/home/stupid/cpz/module$ vi hello.c  # modified again
  root@stupid-HP:/home/stupid/cpz/module$ make clean
  make: Nothing to be done for `clean'.
  root@stupid-HP:/home/stupid/cpz/module$ make
  make: Nothing to be done for `all'.
  </code></pre>