title: Different 'make' behaviour
body: <p>I'm trying to write a makefile for a kernel module and cannot get it to work. Running the following has this output</p>
  
  <pre><code>$ make
  make: Nothing to be done for 'all'.
  </code></pre>
  
  <p>but running the make command directly on the terminal results in</p>
  
  <pre><code>$ make -C /lib/modules/$(uname -r)/build M=$(pwd) modules
  make: Entering directory '/usr/src/linux-headers-3.5.0-17-generic'
     CC [M] &lt;blah&gt;
     Building modules, stage 2
     &lt;blah&gt;
  make: Leaving directory...
  </code></pre>
  
  <p>The contents of my Makefile are (source file is main.c)</p>
  
  <pre><code>obj-m += main.o
  all:
      make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) modules
  </code></pre>
  
  <p>I do delete *.o and *.ko before trying to use the makefile. Changing <code>all</code> to <code>default</code> does nothing either.</p>