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:
		
							
								
								
									
										9
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user