more robust makefile
This commit is contained in:
parent
966c1416f4
commit
e560ac6386
1 changed files with 9 additions and 3 deletions
12
Makefile
12
Makefile
|
@ -1,7 +1,13 @@
|
|||
obj-m += mod_hello.o
|
||||
|
||||
all:
|
||||
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
|
||||
all: module helloctl/helloctl
|
||||
|
||||
helloctl/helloctl: ./helloctl/helloctl.c
|
||||
$(CC) -o $@ $<
|
||||
|
||||
module:
|
||||
$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
|
||||
|
||||
clean:
|
||||
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
|
||||
$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
|
||||
rm -f helloctl/helloctl *~
|
||||
|
|
Loading…
Reference in a new issue