#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS))) export MAKE = make -j2 "INSTALL=install --strip-program=true" QUIET= endif CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) %: dh $@ override_dh_auto_build: cd toboot && $(MAKE) cd booster && $(MAKE) gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) booster/make-booster.c -o booster/make-booster cd booster && ./make-booster ../toboot/toboot.bin toboot-booster.bin && cp toboot-booster.bin toboot-booster.dfu dfu-suffix --pid 0x70b1 --vid 0x1209 --add booster/toboot-booster.dfu override_dh_auto_clean: cd toboot && $(MAKE) clean cd booster && $(MAKE) clean $(RM) booster/make-booster booster/toboot-booster.bin booster/toboot-booster.dfu override_dh_fixperms: dh_fixperms chmod 644 debian/firmware-tomu/usr/lib/firmware-tomu/*