README and make targets
This commit is contained in:
parent
e560ac6386
commit
c0ec581549
2 changed files with 61 additions and 2 deletions
9
Makefile
9
Makefile
|
@ -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 *~
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue