#
#	Makefile for zd1201 driver
#

#ifndef KERNEL_SOURCE
KERNEL_SOURCE=/lib/modules/`uname -r`/build/
#endif

#ifndef KERNEL_VERSION
KERNEL_VERSION=$(basename $(shell uname -r))
#endif

#ifndef FIRMWARE
FIRMWARE=zd1201.fw zd1201-ap.fw
#endif

ifneq ($(KERNEL_VERSION),2.6)
$(error Kernel version ${KERNEL_VERSION} not supported by this driver.)
endif

INSTALL = cp -p -f

default: modules

modules:
	make -C ${KERNEL_SOURCE} M=${PWD} modules

clean:
	make -C ${KERNEL_SOURCE} M=${PWD} clean

install:	modules_install

modules_install:
	make -C ${KERNEL_SOURCE} M=${PWD} modules_install

