#################################################################################
# File level history, record changes for this file here.			#
#										#	
# v 0.0.0 16 Oct 2007 by Golden Wang						#
#  Give support to Linux kernel 2.6.x						#
#										#
#################################################################################		
ifeq ($(KERNELRELEASE),)
KVER           := $(shell uname -r)
KDIR           := /lib/modules/$(KVER)/build
KMISC          := /lib/modules/$(KVER)/kernel/drivers/net/
KEXT           := $(shell echo $(KVER) | sed -ne 's/^2\.[567]\..*/k/p')o
KFLAG          := 2$(shell echo $(KVER) | sed -ne 's/^2\.[4]\..*/4/p')x

modules:

	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) LDDINCDIR=$(PWD) modules

clean:
	rm -rf *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags .tmp_versions
inst:
	insmod ./icpdas_usbserial.ko
	insmod ./icpdas_pl2303.ko

uninst:
	rmmod icpdas_pl2303
	rmmod icpdas_usbserial

else
EXTRA_CFLAGS += -I$(PWD)
# call from kernel build system
icpdas_usbserial-objs := usb-serial.o generic.o bus.o
icpdas_pl2303-objs := pl2303.o

obj-m := icpdas_usbserial.o icpdas_pl2303.o

endif

