KDIR	:= /lib/modules/$(shell uname -r)/build
PWD	:= $(shell pwd)
obj-m   := pci1714.o pci1744.o

all:	modules adtest

adtest:	adtest.c pci17x4.h
	gcc -g -o adtest adtest.c

modules:
	@$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

install: modules
	@$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
	@install -p -o root -g root -m 644 90-advpci*-daq.rules /lib/udev/rules.d

clean:
	rm -rf *.o *.ko *.mod.c [Mm]odule* .*.cmd .tmp* adtest


