aboutsummaryrefslogtreecommitdiffstats
path: root/testing/compat-wireless-grsec/makefile.patch
blob: 0f1ef0221d760386b76aa631dc90653e5ca27a38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
diff -ru a/Makefile b/Makefile
--- a/Makefile	2009-09-02 21:32:42.000000000 +0000
+++ b/Makefile	2009-09-02 21:37:18.000000000 +0000
@@ -8,6 +8,7 @@
 export KLIB_BUILD ?=	$(KLIB)/build
 # Sometimes not available in the path
 MODPROBE := /sbin/modprobe
+DEPMOD := /sbin/depmod
 MADWIFI=$(shell $(MODPROBE) -l ath_pci)
 OLD_IWL=$(shell $(MODPROBE) -l iwl4965)
 
@@ -58,20 +59,24 @@
 	@touch $@
 	@md5sum $(COMPAT_CONFIG) > $(CONFIG_CHECK)
 
-install: uninstall modules
+install:	install-kernel install-user
+
+install-kernel: uninstall modules
 	$(MAKE) -C $(KLIB_BUILD) M=$(PWD) $(KMODDIR_ARG) $(KMODPATH_ARG) \
-		modules_install
+		INSTALL_MOD_PATH=$(DESTDIR) modules_install
+
+install-user:
 	@# All the scripts we can use
-	@mkdir -p /usr/lib/compat-wireless/
-	@install scripts/modlib.sh	/usr/lib/compat-wireless/
-	@install scripts/madwifi-unload	/usr/sbin/
+	@mkdir -p $(DESTDIR)/usr/lib/compat-wireless/ $(DESTDIR)/usr/sbin/
+	@install scripts/modlib.sh	$(DESTDIR)/usr/lib/compat-wireless/
+	@install scripts/madwifi-unload	$(DESTDIR)/usr/sbin/
 	@# This is to allow switching between drivers without blacklisting
-	@install scripts/athenable	/usr/sbin/
-	@install scripts/b43enable	/usr/sbin/
-	@install scripts/iwl-enable	/usr/sbin/
-	@install scripts/athload	/usr/sbin/
-	@install scripts/b43load	/usr/sbin/
-	@install scripts/iwl-load	/usr/sbin/
+	@install scripts/athenable	$(DESTDIR)/usr/sbin/
+	@install scripts/b43enable	$(DESTDIR)/usr/sbin/
+	@install scripts/iwl-enable	$(DESTDIR)/usr/sbin/
+	@install scripts/athload	$(DESTDIR)/usr/sbin/
+	@install scripts/b43load	$(DESTDIR)/usr/sbin/
+	@install scripts/iwl-load	$(DESTDIR)/usr/sbin/
 	@if [ ! -z $(MADWIFI) ]; then \
 		echo ;\
 		echo -n "Note: madwifi detected, we're going to disable it. "  ;\
@@ -96,7 +101,7 @@
 	@# won't know mac80211.ko should be used instead of
 	@# mac80211.ko.gz
 	@./scripts/compress_modules
-	@/sbin/depmod -ae
+	@$(DEPMOD) -ae
 	@echo
 	@echo "Currently detected wireless subsystem modules:"
 	@echo 
@@ -158,7 +163,7 @@
 	@rm -f $(KLIB)/$(KMODDIR)/drivers/misc/eeprom/eeprom_93cx6.ko*
 	@rm -f $(KLIB)/$(KMODDIR)/drivers/misc/eeprom_93cx6.ko*
 	@rm -f $(KLIB)/$(KMODDIR)/drivers/net/b44.ko*
-	@/sbin/depmod -ae
+	@$(DEPMOD) -ae
 	@echo
 	@echo "Your old wireless subsystem modules were left intact:"
 	@echo 
@@ -214,7 +219,7 @@
 load: unload
 	@./scripts/load.sh
 
-.PHONY: all clean install uninstall unload load
+.PHONY: all clean install install-kernel install-user uninstall unload load
 
 endif