projects
/
cascardo
/
kernel
/
samples
/
03.proc
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use a complete makefile.
[cascardo/kernel/samples/03.proc/.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index
8569a8c
..
e8b015c
100644
(file)
--- 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