diff --git a/Makefile b/Makefile index 3e3adeb..d2c88af 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,9 @@ -obj-m := bbswitch.o +modname := bbswitch +obj-m := $(modname).o KVERSION := $(shell uname -r) KDIR := /lib/modules/$(KVERSION)/build -PWD := $(shell pwd) +PWD := "$$(pwd)" default: $(MAKE) -C $(KDIR) M=$(PWD) modules @@ -11,5 +12,5 @@ clean: $(MAKE) -C $(KDIR) M=$(PWD) clean load: - -/sbin/rmmod bbswitch - /sbin/insmod bbswitch.ko + -/sbin/rmmod $(modname) + /sbin/insmod $(modname).ko