diff options
author | Bala Shanmugam <sbalashanmugam@atheros.com> | 2009-12-24 16:54:28 +0530 |
---|---|---|
committer | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-12-28 17:33:36 -0800 |
commit | a3c581a7becf8f4a530c3bfbe0228e559c5dca27 (patch) | |
tree | 1389b8c5b8bdfe23f4bfccaec78a983c0ec758d7 /Makefile | |
parent | ee8062736a2dbf47c66f24e0605d2d7cdd33fe13 (diff) |
compat-2.6: New targets to compile bluetooth alone
Compiling compat-pacakage consumes more time
as both wireless and bluetooth modules are compiled.
For someone who wants to use bluetooth alone
compiling and installing wireless modules is unnecessary
and is time consuming.
New targets are declared to compile, install, uninstall, load
and unload bluetooth modules seperately.
Usage is updated in README.
Signed-off-by: Bala Shanmugam <sbalashanmugam@atheros.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 68 |
1 files changed, 65 insertions, 3 deletions
@@ -21,16 +21,19 @@ obj-y := compat/ obj-$(CONFIG_COMPAT_RFKILL) += net/rfkill/ +ifeq ($(BT),) obj-$(CONFIG_COMPAT_WIRELESS) += net/wireless/ net/mac80211/ obj-$(CONFIG_COMPAT_WIRELESS_MODULES) += drivers/net/wireless/ obj-$(CONFIG_COMPAT_NET_USB_MODULES) += drivers/net/usb/ +obj-$(CONFIG_COMPAT_NETWORK_MODULES) += drivers/net/ +obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/misc/eeprom/ +endif + obj-$(CONFIG_COMPAT_BLUETOOTH) += net/bluetooth/ obj-$(CONFIG_COMPAT_BLUETOOTH_MODULES) += drivers/bluetooth/ -obj-$(CONFIG_COMPAT_NETWORK_MODULES) += drivers/net/ -obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/misc/eeprom/ # Sorry ssb requires pcmica backport for 2.6.33 which is not done yet # drivers/ssb/ @@ -56,6 +59,11 @@ modules: $(CREL_CHECK) $(MAKE) -C $(KLIB_BUILD) M=$(PWD) modules @touch $@ +bt: $(CREL_CHECK) + @./scripts/check_config.sh + $(MAKE) -C $(KLIB_BUILD) M=$(PWD) BT=TRUE modules + @touch $@ + # With the above and this we make sure we generate a new compat autoconf per # new relase of compat-wireless-2.6 OR when the user updates the # $(COMPAT_CONFIG) file @@ -66,6 +74,60 @@ $(CREL_CHECK): @touch $@ @md5sum $(COMPAT_CONFIG) > $(CONFIG_CHECK) +btinstall: btuninstall bt-install-modules bt-install-scripts + +bt-install-modules: bt + $(MAKE) -C $(KLIB_BUILD) M=$(PWD) $(KMODDIR_ARG) $(KMODPATH_ARG) BT=TRUE \ + modules_install + +bt-install-scripts: + @# All the scripts we can use + @# Mandrake doesn't have a depmod.d/ conf file to prefer + @# the updates/ dir which is what we use so we add one for it + @# (or any other distribution that doens't have this). + @/sbin/depmod -ae + @echo + @echo "Currently detected bluetooth subsystem modules:" + @echo + @$(MODPROBE) -l sco + @$(MODPROBE) -l l2cap + @$(MODPROBE) -l hidp + @$(MODPROBE) -l rfcomm + @$(MODPROBE) -l bnep + @$(MODPROBE) -l btusb + @$(MODPROBE) -l bluetooth + @echo + @echo Now run: + @echo + @echo sudo make btunload: + @echo + @echo And the load the needed bluetooth modules. If unsure reboot. + @echo + +btuninstall: + @# New location, matches upstream + @rm -rf $(KLIB)/$(KMODDIR)/net/bluetooth/ + @rm -rf $(KLIB)/$(KMODDIR)/drivers/bluetooth/ + @# Lets only remove the stuff we are sure we are providing + @# on the misc directory. + @/sbin/depmod -ae + @echo + @echo "Your old bluetooth subsystem modules were left intact:" + @echo + @$(MODPROBE) -l sco + @$(MODPROBE) -l l2cap + @$(MODPROBE) -l hidp + @$(MODPROBE) -l rfcomm + @$(MODPROBE) -l bnep + @$(MODPROBE) -l btusb + @$(MODPROBE) -l bluetooth + @ + @echo + +btclean: + make -C /lib/modules/$(shell uname -r)/build M=$(PWD) BT=TRUE clean + @rm -f $(CREL_PRE)* + install: uninstall install-modules install-scripts install-modules: modules @@ -293,7 +355,7 @@ wlunload: wlload: wlunload @./scripts/wlload.sh -.PHONY: all clean install uninstall unload load btunload btload wlunload wlload modules +.PHONY: all clean install uninstall unload load btunload btload wlunload wlload modules bt endif |