#!/usr/bin/make -f

export DESTDIR = $(CURDIR)/debian/hailo-dkms/usr
FORCEDIR = $(DESTDIR)/share/dkms/modules_to_force_install

%:
	dh $@

override_dh_auto_configure:
override_dh_auto_build:
override_dh_auto_install:
	make -C linux/pcie install_dkms
	mkdir -p $(FORCEDIR)
	echo "hailo_pci_version-override" > $(FORCEDIR)/hailo_pci
	find $(DESTDIR) -type f -executable -exec chmod -x {} \+
