ifneq ($(KERNELRELEASE),)
# called bak by the kernel makefile
obj-m		:=acksys8250_pci.o
acksys8250_pci-objs	:=ack8250.o ack8250_pci.o
else
# called by the user
# use make KDIR=... to override
KVER	=$(shell uname -r)
KDIR	:=/lib/modules/$(KVER)/build	# default path
PWD	:=$(shell pwd)

default:
	# calling the kernel makefile
	$(MAKE) -C $(KDIR) $(OOPT) SUBDIRS=$(PWD)
install:
	$(MAKE) -C $(KDIR) $(OOPT) SUBDIRS=$(PWD) modules_install
	depmod
clean:
	rm -rf .tmp_versions *.o *.ko *.mod.c Module.* modules* .*.cmd
endif
