
# KMOD_NAME := mrf

# .PHONY: dkms_add

# dkms_add: conf
#       $(MSI) -M name="$(E3_MODULE_NAME)" -M  version="$(E3_MODULE_VERSION)" -M kmod_name="$(KMOD_NAME)" $(TOP)/dkms/dkms_with_msi.conf.in > $(TOP)/dkms/dkms_with_msi.conf
#       $(QUIET) cat $(TOP)/dkms/dkms_with_msi.conf $(TOP)/dkms/dkms_without_msi.conf > $(TOP)/dkms/dkms.conf
#       $(QUIET) install -m 644 $(TOP)/dkms/dkms.conf  $(E3_KMOD_SRC_PATH)/
#       $(SUDO) install -d /usr/src/$(E3_MODULE_NAME)-$(E3_MODULE_VERSION)
#       $(SUDO) cp -r $(TOP)/$(E3_KMOD_SRC_PATH)/* /usr/src/$(E3_MODULE_NAME)-$(E3_MODULE_VERSION)/
#       $(SUDO) $(DKMS) add $(DKMS_ARGS)


# setup:
#       $(QUIET) $(SUDO2) 'echo KERNEL==\"uio*\", ATTR{name}==\"mrf-pci\", MODE=\"0666\" | tee  /etc/udev/rules.d/99-$(KMOD_NAME).rules'
#       $(QUIET) $(SUDO) /bin/udevadm control --reload-rules
#       $(QUIET) $(SUDO) /bin/udevadm trigger
#       $(QUIET) $(SUDO2) 'echo $(KMOD_NAME) | tee /etc/modules-load.d/$(KMOD_NAME).conf'
#       $(QUIET) $(SUDO) depmod --quick
#       $(QUIET) $(SUDO) modprobe -rv $(KMOD_NAME)
#       $(QUIET) $(SUDO) modprobe -v $(KMOD_NAME)
#       $(QUIET) echo ""
#       $(QUIET) echo ""
#       $(QUIET) echo "It is OK to see \"E3/RULES_DKMS:37: recipe for target 'setup' failed\""
#       $(QUIET) echo "---------------------------------------------------------------------"
#       $(QUIET) -ls -l /dev/uio* 2>/dev/null
#       $(QUIET) echo "---------------------------------------------------------------------"


# setup_clean:
#       $(QUIET) $(SUDO) modprobe -rv $(KMOD_NAME)
#       $(SUDO) rm -f /etc/modules-load.d/$(KMOD_NAME).conf
#       $(SUDO) rm -f /etc/udev/rules.d/99-$(KMOD_NAME).rules


# .PHONY: setup setup_clean

