#!/usr/bin/make -f

# Use clang and lld for compilation
export CC=clang
export LD=lld

# The dh sequencer will automatically call the correct targets.
%:
	dh $@

# Override the default build target to use the upstream Makefile.
override_dh_auto_build:
	make

# Override the default clean target to use the upstream Makefile's clean target.
override_dh_auto_clean:
	make clean

# Override the default install target to install the built EFI binary.
override_dh_auto_install:
	install -d debian/dtbloader/usr/lib/dtbloader
	install -m 644 build-aarch64/dtbloader.efi debian/dtbloader/usr/lib/dtbloader/
