# Makefile for ib-*.o (Linux driver for iBurst network devices).
# To build, login to appropriate linux system as any user and do "make".
#
# Caution: the drivers created are specific to the configuration for which they
# were built.

IB_KERNEL_VERSION ?= $(shell uname -r)
MDIR := /lib/modules/$(IB_KERNEL_VERSION)
KDIR := $(MDIR)/build
PWD := $(shell pwd)

obj-m = ib-net.o
obj-m += ib-pcmcia.o
obj-m += ib-usb.o

default:
	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

install:
	cp *.ko $(MDIR)/kernel/drivers/net/
	echo checking module dependancies...
	depmod -a

uninstall:
	rm $(MDIR)/kernel/drivers/net/ib-*.ko

clean:
	rm -f *.mod.c *.ko *.o .*.cmd core Modules.symvers
	rm -fr .tmp_versions
