# $Id: Makefile 463 2004-05-18 01:47:51Z mcgrof $

KVER	       := $(shell uname -r)
KDIR           := /lib/modules/$(KVER)/build
KMISC          := /lib/modules/$(KVER)/kernel/drivers/net/wireless/prism54/
KEXT           := $(shell echo $(KVER) | sed -ne 's/^2\.[567]\..*/k/p')o
KOUT           := $(KDIR)

.PHONY: default modules install clean module-all modules-clean modules-install

default: 
	@echo "*******************************************************"
	@echo "*    please see README file for more information      *"
	@echo "*******************************************************"
	@echo ""
	@echo " KVER = $(KVER)"
	@echo " KDIR = $(KDIR)"
	@echo " KMISC= $(KMISC)"
	@echo " KEXT = $(KEXT)"
	@echo " KOUT = $(KOUT)"
	@echo ""
	@echo " supported make targets: modules install clean"
	@echo ""

modules: modules-all
install: default modules-install
clean:   modules-clean

modules-all:
	$(MAKE) -C ksrc/ modules

modules-clean:
	$(MAKE) -C ksrc/ clean

modules-install:
	install -d $(KMISC)
	install -m 644 -c ksrc/prism54.$(KEXT) $(KMISC)
	#install -d /usr/lib/hotplug/firmware
	#install -c isl3877 /usr/lib/hotplug/firmware
	#install -c isl3890 /usr/lib/hotplug/firmware
	@echo "dont forget to copy firmware to /usr/lib/hotplug/firmware/ and have the hotplug tools in place"
