#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --buildsystem=cmake

override_dh_auto_configure:
	dh_auto_configure -- \
	  -DCMAKE_BUILD_TYPE=Release \
	  -DXNNPACK_LIBRARY_TYPE=shared \
	  -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
	  -DXNNPACK_BUILD_TESTS=OFF \
	  -DXNNPACK_BUILD_BENCHMARKS=OFF \
	  -DXNNPACK_ENABLE_RISCV_VECTOR=ON \
	  -DXNNPACK_ENABLE_RISCV_FP16_VECTOR=ON

override_dh_auto_test:
	# upstream tests skipped for packaging build
