Add Makefile to enable external build
authorAlex Bligh <alex@alex.org.uk>
Wed, 18 May 2011 07:36:06 +0000 (08:36 +0100)
committerAlex Bligh <alex@alex.org.uk>
Wed, 18 May 2011 07:36:06 +0000 (08:36 +0100)
Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..10f82f8
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,13 @@
+ifneq ($(KERNELRELEASE),)
+# kbuild part of makefile
+obj-m  := nbd.o
+
+else
+
+# normal makefile
+KDIR ?= /lib/modules/`uname -r`/build
+
+default:
+       $(MAKE) -C $(KDIR) M=$$PWD
+
+endif