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

-include /usr/share/dpkg/buildtools.mk
include /usr/share/dpkg/pkg-info.mk

export PKG_CONFIG ?= pkg-config
export DEB_BUILD_MAINT_OPTIONS=hardening=+all optimize=+lto
export DEB_CFLAGS_MAINT_APPEND = -fdata-sections -ffunction-sections
export DEB_CPPFLAGS_MAINT_APPEND = -D_FILE_OFFSET_BITS=64
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--gc-sections

MAKEOPTIONS = V="1" REVISION="debian-$(DEB_VERSION)" PREFIX="/usr" CONFIG_bisect_iv=y

binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep:
	dh $@

override_dh_auto_build:
	dh_auto_build -- $(MAKEOPTIONS)

override_dh_auto_install:
	dh_auto_install -- $(MAKEOPTIONS)

override_dh_installchangelogs:
	dh_installchangelogs CHANGELOG.rst

.PHONY: binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep \
	override_dh_auto_build override_dh_auto_install override_dh_installchangelogs