#!/usr/bin/make -f

ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
VERBOSE=1
else
VERBOSE=0
endif

%:
	dh $@

override_dh_auto_build:
	OPENSBI=/usr/lib/riscv64-linux-gnu/opensbi/generic/fw_dynamic.bin \
	CROSS_COMPILE=riscv64-linux-gnu- \
	make V=$(VERBOSE)
	tools/mkimage -T sunxi_toc1 -d toc1.cfg u-boot.toc1

override_dh_auto_clean:
	make mrproper

override_dh_auto_configure:
	make nezha_defconfig

override_dh_auto_test:

override_dh_strip:
