From 379d9cea1badbd386fc326cb0a1003b675717a7f Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Tue, 8 Dec 2009 07:16:48 -0200 Subject: [PATCH] Use a complete makefile. --- Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8569a8c..e8b015c 100644 --- a/Makefile +++ b/Makefile @@ -1 +1,11 @@ -obj-m := hello_procfs.o +ifneq ($(KERNELRELEASE),) + obj-m := hello_procfs.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 -- 2.20.1