#!/usr/bin/make -f # arm-none-eabi-gcc does not support branch protection instructions # arm-none-eabi-gcc does not support -fstack-check=specific export DEB_BUILD_MAINT_OPTIONS = hardening=-branch,-stackclash DEB_HOST_GNU_TYPE ?=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) %: dh $@ override_dh_auto_configure: # setting PICO_EXAMPLES_PATH=/dev/null to avoid requiring # https://github.com/raspberrypi/pico-examples dh_auto_configure -- -DPICO_SDK_TESTS_ENABLED=ON -DPICO_EXAMPLES_PATH=/dev/null -DPICO_BUILD_DOCS=ON override_dh_installdocs: cp -a debian/roboto-debian.css obj-$(DEB_HOST_GNU_TYPE)/docs/doxygen/html/ dh_installdocs obj-$(DEB_HOST_GNU_TYPE)/docs/doxygen/html/ execute_after_dh_auto_build: dh_auto_build -- docs # CMakeLists.txt unconditionally runs add_subdirectory(docs) but we don't want # to ship the documentation source with pico-sdk-source so we create a dummy override_dh_auto_install: mkdir -p debian/pico-sdk-source/usr/src/pico-sdk/docs touch debian/pico-sdk-source/usr/src/pico-sdk/docs/CMakeLists.txt execute_before_dh_auto_configure: mkdir -p ./lib ln -s /usr/src/tinyusb ./lib/tinyusb test -e ./lib/tinyusb/src/portable/raspberrypi/rp2040 execute_before_dh_auto_clean: if [ -d ./lib/tinyusb ]; then rmdir ./lib/tinyusb; else rm -f ./lib/tinyusb; fi