#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+format,+fortify,+stackprotector,+relro,+bindnow
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
CFLAGS+=$(CPPFLAGS)
CXXFLAGS+=$(CPPFLAGS)

include /usr/share/dpkg/pkg-info.mk 


%:
	dh $@ --with dkms

override_auto_build:
	cd lib && $(MAKE)
	cd test && $(MAKE)

override_dh_dkms:
	dh_dkms -V $(DEB_UPSTREAM_VERSION)


override_dh_install:
	cp driver/pcan.h driver/pcanfd.h debian/tmp/usr/include/
	dh_install
