Don't expand the current directory in the Makefile, let the shell expand it. Furthermore, replace all occurences of the modulename by a variable
17 lines
279 B
Makefile
17 lines
279 B
Makefile
modname := bbswitch
|
|
obj-m := $(modname).o
|
|
|
|
KVERSION := $(shell uname -r)
|
|
KDIR := /lib/modules/$(KVERSION)/build
|
|
PWD := "$$(pwd)"
|
|
|
|
default:
|
|
$(MAKE) -C $(KDIR) M=$(PWD) modules
|
|
|
|
clean:
|
|
$(MAKE) -C $(KDIR) M=$(PWD) clean
|
|
|
|
load:
|
|
-/sbin/rmmod $(modname)
|
|
/sbin/insmod $(modname).ko
|