2014-09-17 20:51:24 +00:00
|
|
|
obj-m += mod_hello.o
|
|
|
|
|
2017-11-05 14:50:18 +00:00
|
|
|
all: build info
|
|
|
|
|
|
|
|
build: mod_hello.ko helloctl/helloctl
|
2017-11-05 14:33:39 +00:00
|
|
|
|
|
|
|
helloctl/helloctl: ./helloctl/helloctl.c
|
|
|
|
$(CC) -o $@ $<
|
|
|
|
|
2017-11-05 14:50:18 +00:00
|
|
|
mod_hello.ko: mod_hello.c
|
2017-11-05 14:33:39 +00:00
|
|
|
$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
|
2014-09-17 20:51:24 +00:00
|
|
|
|
2017-11-05 14:50:18 +00:00
|
|
|
info: mod_hello.ko
|
|
|
|
modinfo $<
|
|
|
|
|
2014-09-17 20:51:24 +00:00
|
|
|
clean:
|
2017-11-05 14:33:39 +00:00
|
|
|
$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
|
|
|
|
rm -f helloctl/helloctl *~
|