title: Kernel module makefile output name
body: <p>I am trying to compile my kernel module.
  The .c file name is <code>file1.c</code>, but I need the .ko file name to be <code>mod1.ko</code>.</p>
  
  <p>How can I do that?</p>
  
  <p>My current makefile:</p>
  
  <pre><code>obj-m := mod1.o
  KDIR :=/lib/modules/$(shell uname -r)/build
  PDW := $(shell pwd)
  
  all:
      $(MAKE) -C $(KDIR) M=$(PDW) modules
  
  clean:
      $(MAKE) -C $(KDIR) M=$(PDW) clean
  </code></pre>