# Makefile for camdrv
# Created by Enomoto Sanshiro on 11 April 1999.
# Last updated by Enomoto Sanshiro on 7 January 2006.


TARGET = camdrv

obj-m = $(TARGET).o
KERNEL_VERSION = $(shell uname -r)
PWD = $(shell pwd)


# If intervals of two ioport accesses can be less than 50nsec, 
# which is usually short enough for present computers,
# enable the following ENABLE_DELAY definition.
# Note that this delay can seriously affect CAMAC I/O performance.

# CFLAGS += -DENABLE_DELAY


default: 
	make -C /lib/modules/$(KERNEL_VERSION)/build SUBDIRS=$(PWD) modules


clean:
	rm -f $(TARGET).ko $(TARGET).o $(TARGET).mod.*


install:
	/sbin/insmod $(TARGET).ko
	./install.sh


uninstall:
	/sbin/rmmod $(TARGET)
