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