#!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # At lease DEB_VERSION and SOURCE_DATE_EPOCH are used during the build include /usr/share/dpkg/default.mk %: +dh $@ # qemu EFI roms shall be built with CONFIG=qemu # This makes it apply src/config/*, src/config/qemu/*, src/config/local/*, # src/config/local/qemu/* in this order. src/bin-i386-pcbios/%.rom src/bin-x86_64-efi/%.efirom: export CONFIG=qemu # Export CROSS prefix for building arm64 related files. # This controls the architecture-specific build tools to be used. src/bin-arm64-efi/%: export CROSS=aarch64-linux-gnu- define run-dh_auto_build = dh_auto_build --sourcedirectory=src -- \ V=1 NO_WERROR=1 VERSION="$(DEB_VERSION)" $(subst src/,,$@) endef src/bin-i386-pcbios/%: $(run-dh_auto_build) src/bin-x86_64-efi/%: $(run-dh_auto_build) src/bin-arm64-efi/%: $(run-dh_auto_build) src/bin-combined/%.efirom: src/bin-i386-pcbios/%.rom src/bin-x86_64-efi/%.efirom @mkdir -p $(dir $@) src/util/catrom.pl $^ > $@ # efi roms are >256k since Bionic due to https + natural growth # stay at 256k-512k after disabling https in efi via padding src/util/padimg.pl --blksize=524288 --byte=0xff --verbose $@ src/bin-combined/%.iso: src/bin-i386-pcbios/%.lkrn src/bin-x86_64-efi/%.efi @mkdir -p $(dir $@) debian/util/geniso $@ $^ override_dh_auto_build: $(shell grep -hoE 'src/bin\S+' debian/*.install) execute_after_dh_install: debian/util/check-rom-sizes override_dh_auto_clean: dh_auto_clean --sourcedirectory=src -- veryclean rm -fr src/bin-*