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
|
obj-m += mod_hello.o
|
||||||
|
|
||||||
all:
|
all: module helloctl/helloctl
|
||||||
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
|
|
||||||
|
helloctl/helloctl: ./helloctl/helloctl.c
|
||||||
|
$(CC) -o $@ $<
|
||||||
|
|
||||||
|
module:
|
||||||
|
$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
|
||||||
|
|
||||||
clean:
|
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