From 619d95e7d79e4f61ede032ba07a8630629d7ff5e Mon Sep 17 00:00:00 2001 From: Lekensteyn Date: Mon, 12 Dec 2011 21:15:00 +0100 Subject: [PATCH] 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 --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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