Module parameters.
[cascardo/kernel/samples/01.hello/.git] / Makefile
index d4757ee..d26e7c6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1 +1,11 @@
-obj-m := hello.o
+ifneq ($(KERNELRELEASE),)
+       obj-m := hello.o
+else
+       KERNELDIR ?= /lib/modules/$(shell uname -r)/build
+       PWD := $(shell pwd)
+default:
+       $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
+
+clean:
+       $(MAKE) -C $(KERNELDIR) M=$(PWD) clean
+endif