bbswitch/Makefile: don't fail on paths with special chars
Don't expand the current directory in the Makefile, let the shell expand it. Furthermore, replace all occurences of the modulename by a variable
This commit is contained in:
parent
1e59a3f54e
commit
619d95e7d7
9
Makefile
9
Makefile
@ -1,8 +1,9 @@
|
|||||||
obj-m := bbswitch.o
|
modname := bbswitch
|
||||||
|
obj-m := $(modname).o
|
||||||
|
|
||||||
KVERSION := $(shell uname -r)
|
KVERSION := $(shell uname -r)
|
||||||
KDIR := /lib/modules/$(KVERSION)/build
|
KDIR := /lib/modules/$(KVERSION)/build
|
||||||
PWD := $(shell pwd)
|
PWD := "$$(pwd)"
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$(MAKE) -C $(KDIR) M=$(PWD) modules
|
$(MAKE) -C $(KDIR) M=$(PWD) modules
|
||||||
@ -11,5 +12,5 @@ clean:
|
|||||||
$(MAKE) -C $(KDIR) M=$(PWD) clean
|
$(MAKE) -C $(KDIR) M=$(PWD) clean
|
||||||
|
|
||||||
load:
|
load:
|
||||||
-/sbin/rmmod bbswitch
|
-/sbin/rmmod $(modname)
|
||||||
/sbin/insmod bbswitch.ko
|
/sbin/insmod $(modname).ko
|
||||||
|
Loading…
x
Reference in New Issue
Block a user