#!/usr/bin/make -f
#export DH_VERBOSE = 1

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

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- -DPICO_SDK_PATH="/usr/src/pico-sdk"

override_dh_auto_install: debian/picotool.1
	mkdir -p debian/tmp/
	mv obj-$(DEB_TARGET_GNU_TYPE)/picotool debian/tmp/
	dh_auto_install

override_dh_clean:
	rm -f debian/picotool.1
	dh_clean

debian/picotool.1:
	help2man -N --version-string="${DEB_VERSION_UPSTREAM}" --help-option="help" \
		--output=$@ ./obj-$(DEB_TARGET_GNU_TYPE)/picotool
