#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
export DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
export DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
export DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

DEB_BUILD_MAINT_OPTIONS := hardening=+all
DPKG_EXPORT_BUILDFLAGS := 1
include /usr/share/dpkg/buildflags.mk

override_dh_auto_configure:
	dh_auto_configure -- --enable-benchmark

override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. python3 -m sphinx -N -bhtml docs/ docs/build/
%:
	dh $@