#!/usr/bin/make -f

export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_build:
	# build all the firmwares
	./tools/build_all_firmwares.sh
	echo 'PLATFORM=PM3RDV4' > Makefile.platform
	echo 'PLATFORM_EXTRAS=BTADDON' >> Makefile.platform
	make all

override_dh_auto_install:
	dh_auto_install -- PREFIX=/usr UDEV_PREFIX=/usr/lib/udev/rules.d \
		INSTALLFWRELPATH=lib/proxmark3/firmware \
		INSTALLTOOLSRELPATH=lib/proxmark3/tools
