#
# Makefile for the kernel serial device drivers.
#
# Advantech eAutomation Division
#

ADVMOD := adv950

SERIAL_NAME= ttyAP
MAX_TTY= 16

install:
	$(shell if grep $(ADVMOD) /proc/modules > /dev/null ; then \
	 rmmod $(ADVMOD) ; fi)
	@insmod $(ADVMOD).ko


uninstall:
	$(shell if grep $(ADVMOD) /proc/modules > /dev/null ; then \
	 rmmod $(ADVMOD) ; fi)

test:
	@cd ./getconfig; make; ./getconfig $(SERIAL_NAME) $(MAX_TTY)

clean:
	@rm -f *.o
	@rm -f *.ko
	@rm -f *.mod.c
	@rm -f .*.cmd
	@rm -rf .tmp_versions
	@cd ../getconfig; make clean
