diff options
Diffstat (limited to 'kernel-devel/char-device/example/kernel/Makefile')
| -rw-r--r-- | kernel-devel/char-device/example/kernel/Makefile | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/kernel-devel/char-device/example/kernel/Makefile b/kernel-devel/char-device/example/kernel/Makefile new file mode 100644 index 0000000..822c7d7 --- /dev/null +++ b/kernel-devel/char-device/example/kernel/Makefile @@ -0,0 +1,13 @@ +# If KERNELRELEASE is defined, we've been invoked from the +# kernel build system and can use its language. +ifneq ($(KERNELRELEASE),) + obj-m := huhu.o + +# Otherwise we were called directly from the command +# line; invoke the kernel build system. +else + KERNELDIR ?= /lib/modules/$(shell uname -r)/build + PWD := $(shell pwd) +default: + $(MAKE) -C $(KERNELDIR) M=$(PWD) modules +endif |
