README and make targets

This commit is contained in:
Vincent Batts 2017-11-05 09:50:18 -05:00
parent e560ac6386
commit c0ec581549
2 changed files with 61 additions and 2 deletions

View file

@ -1,13 +1,18 @@
obj-m += mod_hello.o
all: module helloctl/helloctl
all: build info
build: mod_hello.ko helloctl/helloctl
helloctl/helloctl: ./helloctl/helloctl.c
$(CC) -o $@ $<
module:
mod_hello.ko: mod_hello.c
$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
info: mod_hello.ko
modinfo $<
clean:
$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
rm -f helloctl/helloctl *~