14 lines
224 B
Makefile
14 lines
224 B
Makefile
|
ifneq ($(KERNELRELEASE),)
|
||
|
obj-m := hello.o
|
||
|
else
|
||
|
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
|
||
|
PWD := $(shell pwd)
|
||
|
|
||
|
default:
|
||
|
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
|
||
|
|
||
|
endif
|
||
|
|
||
|
clean:
|
||
|
rm -r ./hello.o
|
||
|
rm -r ./hello.ko
|